AttributeError: 'PortContext' object has no attribute 'session' in l3_hamode_db

Bug #1703938 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Ihar Hrachyshka

Bug Description

Jul 11 20:08:35.720679 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers [None req-13c07cf3-201f-4b86-9e92-8f51bd141c6c admin admin] Mechanism driver 'l2population' failed in delete_port_postcommit: AttributeError: 'PortContext' object has no attribute 'session'
Jul 11 20:08:35.720775 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers Traceback (most recent call last):
Jul 11 20:08:35.720895 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers File "/opt/stack/new/neutron/neutron/plugins/ml2/managers.py", line 426, in _call_on_drivers
Jul 11 20:08:35.720971 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers getattr(driver.obj, method_name)(context)
Jul 11 20:08:35.721056 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers File "/opt/stack/new/neutron/neutron/plugins/ml2/drivers/l2pop/mech_driver.py", line 79, in delete_port_postcommit
Jul 11 20:08:35.721134 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers context, port['device_owner'], port['device_id']):
Jul 11 20:08:35.721206 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers File "/opt/stack/new/neutron/neutron/db/l3_hamode_db.py", line 726, in is_ha_router_port
Jul 11 20:08:35.721283 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers context, router_id=router_id, ha=True)
Jul 11 20:08:35.721369 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers File "/opt/stack/new/neutron/neutron/objects/base.py", line 712, in objects_exist
Jul 11 20:08:35.721447 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers context, cls.db_model, **cls.modify_fields_to_db(kwargs))
Jul 11 20:08:35.721526 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers File "/opt/stack/new/neutron/neutron/objects/db/api.py", line 32, in get_object
Jul 11 20:08:35.721610 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers return _get_filter_query(context, model, **kwargs).first()
Jul 11 20:08:35.721725 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers File "/opt/stack/new/neutron/neutron/objects/db/api.py", line 25, in _get_filter_query
Jul 11 20:08:35.721802 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers with context.session.begin(subtransactions=True):
Jul 11 20:08:35.721877 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers AttributeError: 'PortContext' object has no attribute 'session'
Jul 11 20:08:35.721952 ubuntu-xenial-3-node-osic-cloud1-s3500-9770546 neutron-server[27121]: ERROR neutron.plugins.ml2.managers

Example: http://logs.openstack.org/73/304873/44/check/gate-tempest-dsvm-neutron-dvr-ha-multinode-full-ubuntu-xenial-nv/586400d/logs/screen-q-svc.txt.gz?level=TRACE#_Jul_11_20_08_35_720679

tags: added: db l3-ha
Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
status: New → Confirmed
importance: Undecided → High
tags: added: l3-dvr-backlog
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/483085

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/483085
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5c331ecbd25be464184e345cea8f38bb9fc712fc
Submitter: Jenkins
Branch: master

commit 5c331ecbd25be464184e345cea8f38bb9fc712fc
Author: Ihar Hrachyshka <email address hidden>
Date: Wed Jul 12 12:59:36 2017 -0700

    Fixed AttributeError in l2pop.delete_port_postcommit

    The error sneaked in with Ib6e59ab3405857d3ed4d82df1a80800089c3f06e
    where is_ha_router_port expects a NeutronContext object but we still
    pass PortContext instead.

    Change-Id: I593af5d050de00ddea7d758007d9856c4b97695f
    Closes-Bug: #1703938

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.0.0b3

This issue was fixed in the openstack/neutron 11.0.0.0b3 development milestone.

tags: added: neutron-proactive-backport-potential
tags: removed: neutron-proactive-backport-potential
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.