Continuous warning because of missing context wrapper

Bug #1984267 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-l2gw
Fix Released
Undecided
Lajos Katona

Bug Description

In Puppet OpenStack job we observe the following WARNING when networking-l2gw is enabled

https://zuul.opendev.org/t/openstack/build/9033dba56cd843e8a022a9f11a11f69a

https://597ec4b4da1176461210-f1e10e895ca9a37e1229881907aff07c.ssl.cf1.rackcdn.com/845984/2/check/puppet-openstack-integration-7-scenario004-tempest-centos-9-stream/9033dba/logs/neutron/server.txt
~~~
2022-08-10 01:37:59.632 102553 WARNING neutron.objects.base [None req-af43a873-e1a2-47fc-a042-c05b097174d8 29ba9fe95d764558b26721100f5ba111 9638fb7183254ecf9d8a2d6d3a8226e0 - - default default] ORM session: SQL execution without transacti
on in progress, traceback:
  File "/usr/lib/python3.9/site-packages/eventlet/greenthread.py", line 221, in main
    result = function(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/eventlet/wsgi.py", line 837, in process_request
    proto.__init__(conn_state, self)
  File "/usr/lib/python3.9/site-packages/eventlet/wsgi.py", line 350, in __init__
    self.handle()
  File "/usr/lib/python3.9/site-packages/networking_l2gw/db/l2gateway/l2gateway_db.py", line 234, in get_l2_gateway
    gw_db = self._get_l2_gateway(context, id)
  File "/usr/lib/python3.9/site-packages/networking_l2gw/db/l2gateway/l2gateway_db.py", line 46, in _get_l2_gateway
    gw = context.session.query(models.L2Gateway).get(gw_id)
  File "<string>", line 2, in get
...
  File "/usr/lib64/python3.9/site-packages/sqlalchemy/util/deprecations.py", line 402, in warned
    return fn(*args, **kwargs)
  File "/usr/lib64/python3.9/site-packages/sqlalchemy/orm/query.py", line 943, in get
    return self._get_impl(ident, loading.load_on_pk_identity)
  File "/usr/lib64/python3.9/site-packages/sqlalchemy/orm/query.py", line 947, in _get_impl
    return self.session._get_impl(
  File "/usr/lib64/python3.9/site-packages/sqlalchemy/orm/session.py", line 2912, in _get_impl
    return db_load_fn(
  File "/usr/lib64/python3.9/site-packages/sqlalchemy/orm/loading.py", line 530, in load_on_pk_identity
    session.execute(
  File "/usr/lib64/python3.9/site-packages/sqlalchemy/orm/session.py", line 1693, in execute
    result = fn(orm_exec_state)
```

Changed in networking-l2gw:
status: New → Confirmed
assignee: nobody → Lajos Katona (lajos-katona)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-l2gw (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/x/networking-l2gw/+/853669

Changed in networking-l2gw:
status: Confirmed → In Progress
Revision history for this message
Lajos Katona (lajos-katona) wrote :

Takashi, could you please check if this patch covers all the issues? By my testing it is ok.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-l2gw (master)

Reviewed: https://review.opendev.org/c/x/networking-l2gw/+/853669
Committed: https://opendev.org/x/networking-l2gw/commit/fbebe30031a3055c46fa45f85e85a37b4712a370
Submitter: "Zuul (22348)"
Branch: master

commit fbebe30031a3055c46fa45f85e85a37b4712a370
Author: elajkat <email address hidden>
Date: Thu Aug 18 15:12:28 2022 +0200

    Add context for all SQL transactions

    Follow the last efforts to make Neutron compatible with sqlalchemy-20
    (see [1]), and use the necessary context for all SQL transactions.

    [1] https://review.opendev.org/c/openstack/neutron-lib/+/828738
    [2] https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/842113

    Change-Id: I8923760e011aacb8523022e64a3cb38b7eaa89ba
    Closes-Bug: #1984267

Changed in networking-l2gw:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.