Neutron-dynamic-routing: missing transaction wrapper

Bug #1980671 reported by Dr. Jens Harbott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Dr. Jens Harbott

Bug Description

Seen in server log of CI jobs, e.g. https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_d0b/814055/6/check/neutron-dynamic-routing-static/d0ba604/controller/logs/screen-q-svc.txt

```
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: WARNING neutron.objects.base [None req-f8a55008-3361-4a49-9743-ec6c38912b7b None None] ORM session: SQL execution without transaction in progress, traceback:
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: File "/usr/local/lib/python3.8/dist-packages/eventlet/greenthread.py", line 221, in main
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: result = function(*args, **kwargs)
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: File "/usr/local/lib/python3.8/dist-packages/oslo_service/loopingcall.py", line 150, in _run_loop
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: result = func(*self.args, **self.kw)
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: File "/opt/stack/neutron-dynamic-routing/neutron_dynamic_routing/db/bgp_dragentscheduler_db.py", line 141, in remove_bgp_speaker_from_down_dragents
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: self.reschedule_resources_from_down_agents(
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: File "/opt/stack/neutron/neutron/db/agentschedulers_db.py", line 146, in reschedule_resources_from_down_agents
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: down_bindings = get_down_bindings(context, agent_dead_limit)
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: File "/opt/stack/neutron-dynamic-routing/neutron_dynamic_routing/db/bgp_dragentscheduler_db.py", line 157, in get_down_bgp_speaker_bindings
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: down_bindings = [b for b in query]
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/query.py", line 2896, in __iter__
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: return self._iter().__iter__()
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/query.py", line 2903, in _iter
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: result = self.session.execute(
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/session.py", line 1693, in execute
Jun 26 12:08:41.416413 ubuntu-focal-iweb-mtl01-0030172047 neutron-server[75221]: result = fn(orm_exec_state)
```

Tags: l3-bgp
Changed in neutron:
assignee: nobody → Dr. Jens Harbott (j-harbott)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-dynamic-routing (master)
Changed in neutron:
status: New → In Progress
tags: added: l3-bgp
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-dynamic-routing (master)

Reviewed: https://review.opendev.org/c/openstack/neutron-dynamic-routing/+/848645
Committed: https://opendev.org/openstack/neutron-dynamic-routing/commit/0d2782fb7ec645fb0f0ad4de6a1e3a788ae41266
Submitter: "Zuul (22348)"
Branch: master

commit 0d2782fb7ec645fb0f0ad4de6a1e3a788ae41266
Author: Dr. Jens Harbott <email address hidden>
Date: Mon Jul 4 16:51:26 2022 +0200

    [sqlalchemy-20] Add missing DB context decorator

    One query was being executed without context decorator, leading to
    warning messages in the log.

    Closes-Bug: 1980671
    Change-Id: Iebdc16e32193a6bc1eea5ea69c16f4aca5bd4526

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron-dynamic-routing (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron-dynamic-routing (master)

Reviewed: https://review.opendev.org/c/openstack/neutron-dynamic-routing/+/852775
Committed: https://opendev.org/openstack/neutron-dynamic-routing/commit/d98b177a26960732c775efe49eb52921e121358e
Submitter: "Zuul (22348)"
Branch: master

commit d98b177a26960732c775efe49eb52921e121358e
Author: Takashi Kajinami <email address hidden>
Date: Thu Aug 11 00:34:30 2022 +0900

    [sqlalchemy-20] Add (still) missing DB context decorator

    This fixes one query still being executed without context decorator,
    which is causing the warning messages.

    Related-Bug: #1980671
    Closes-Bug: #1984238
    Change-Id: I3eba9c919e153dd253988fee31a7cebaf3cad773

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron-dynamic-routing 21.0.0.0rc1

This issue was fixed in the openstack/neutron-dynamic-routing 21.0.0.0rc1 release candidate.

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.