ofagent: AttributeError: 'OFANeutronAgent' object has no attribute 'updated_ports'

Bug #1314472 reported by YAMAMOTO Takashi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Eugene Nikanorov
Icehouse
Fix Released
Undecided
Unassigned

Bug Description

OFANeutronAgent.__init__() calls setup_rpc(), which spawns a thread to consume RPCs.
self.updated_ports, which is accessed by an RPC handler, port_update(), has not been initialized at this point.

Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :

OVS agent seems to have the same problem.

Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :

here's a log. the line numbers are not same as master because of local patches.

2014-04-30 11:48:01.272 ERROR neutron.openstack.common.rpc.amqp [req-b15e55ef-0038-49c8-b1db-7a6e964c3f25 None None] Exception during message handling
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp Traceback (most recent call last):
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/openstack/common/rpc/amqp.py", line 462, in _process_data
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp **args)
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/openstack/common/rpc/dispatcher.py", line 172, in dispatch
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, **kwargs)
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp File "/opt/stack/neutron/neutron/plugins/ofagent/agent/ofa_neutron_agent.py", line 365, in port_update
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp self.updated_ports.add(port['id'])
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp AttributeError: 'OFANeutronAgent' object has no attribute 'updated_ports'
2014-04-30 11:48:01.272 TRACE neutron.openstack.common.rpc.amqp

Revision history for this message
Aaron Rosen (arosen) wrote :

Curious how this is occurs, the attribute looks to be setup correctly in the __init__ https://github.com/openstack/neutron/blob/master/neutron/plugins/ofagent/agent/ofa_neutron_agent.py#L279

Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :
Revision history for this message
Eugene Nikanorov (enikanorov) wrote :
Changed in neutron:
assignee: nobody → Eugene Nikanorov (enikanorov)
status: New → Confirmed
Kyle Mestery (mestery)
Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/91355
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=717a0a0ab4436e2904360fe4e34226af7d0e412d
Submitter: Jenkins
Branch: master

commit 717a0a0ab4436e2904360fe4e34226af7d0e412d
Author: Eugene Nikanorov <email address hidden>
Date: Wed Apr 30 16:04:58 2014 +0400

    OVS and OF Agents: Create updated_ports attribute before setup_rpc

    setup_rpc spawns rpc-consuming thread that can access
    self.updated_ports before it is created in the constructor

    Change-Id: Icc447c3bb7099125aae30e2430a6ad98ba00f6f9
    Closes-Bug: #1314472

Changed in neutron:
status: Confirmed → Fix Committed
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → juno-1
tags: added: ml2 openflowagent
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/98853

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/icehouse)

Reviewed: https://review.openstack.org/98853
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=77d8da1ca45ab97a81d94effd3c4119b65fc4278
Submitter: Jenkins
Branch: stable/icehouse

commit 77d8da1ca45ab97a81d94effd3c4119b65fc4278
Author: Eugene Nikanorov <email address hidden>
Date: Wed Apr 30 16:04:58 2014 +0400

    OVS and OF Agents: Create updated_ports attribute before setup_rpc

    setup_rpc spawns rpc-consuming thread that can access
    self.updated_ports before it is created in the constructor

    Change-Id: Icc447c3bb7099125aae30e2430a6ad98ba00f6f9
    Closes-Bug: #1314472
    (cherry picked from commit 717a0a0ab4436e2904360fe4e34226af7d0e412d)

tags: added: in-stable-icehouse
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-1 → 2014.2
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.