Duplicated messages in agent's fanout topic

Bug #1413156 reported by Ilya Shakhat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Ilya Shakhat
Juno
Fix Released
Undecided
Unassigned

Bug Description

Steps to reproduce on devstack:
1. Create the router:
     neutron router-create test
2. Set gateway for the router:
     neutron router-gateway-set test public
3. Delete the router:
     neutron router-delete test

The notification about router deletion arrives into L3 agent twice:
2015-01-21 10:53:48.401 DEBUG neutron.agent.l3.agent [req-ce68777f-da33-4381-a7ff-9b8c0eaac380 demo bdb38765a9394f2c962b952675f65073] Got router deleted notification for 10bf431d-6c76-4b87-8db1-57e7fb69076
8 from (pid=8310) router_deleted /opt/stack/neutron/neutron/agent/l3/agent.py:969

2015-01-21 10:53:48.402 DEBUG neutron.agent.l3.agent [req-ce68777f-da33-4381-a7ff-9b8c0eaac380 demo bdb38765a9394f2c962b952675f65073] Got router deleted notification for 10bf431d-6c76-4b87-8db1-57e7fb69076
8 from (pid=8310) router_deleted /opt/stack/neutron/neutron/agent/l3/agent.py:969

Notifications are processed sequentially, the first successfully removes the router, while the second results in warning:
2015-01-21 10:53:50.957 WARNING neutron.agent.l3.agent [req-ce68777f-da33-4381-a7ff-9b8c0eaac380 demo bdb38765a9394f2c962b952675f65073] Info for router 10bf431d-6c76-4b87-8db1-57e7fb690768 were not found. Skipping router removal

Ilya Shakhat (shakhat)
Changed in neutron:
assignee: nobody → Ilya Shakhat (shakhat)
Revision history for this message
Ilya Shakhat (shakhat) wrote :

The fanout consumer is registered twice in agent:
1. In neutron/common/rpc (https://github.com/openstack/neutron/blob/master/neutron/common/rpc.py#L161-L167)
 and
2. In oslo.messaging amqp driver (https://github.com/openstack/oslo.messaging/blob/master/oslo_messaging/_drivers/amqpdriver.py#L428-L435)

List of bindings:
developer@ubuntu-ilya:~$ ./rabbitmqadmin -u guest -p <secure> list bindings | grep l3_agent_fanout
| | l3_agent_fanout_7e72c061792a443cb5c83d72c014dc2f | l3_agent_fanout_7e72c061792a443cb5c83d72c014dc2f |
| | l3_agent_fanout_d03753e6a73e40e48dc6bd99c5cbfd75 | l3_agent_fanout_d03753e6a73e40e48dc6bd99c5cbfd75 |
| l3_agent_fanout | l3_agent_fanout_7e72c061792a443cb5c83d72c014dc2f | l3_agent |
| l3_agent_fanout | l3_agent_fanout_d03753e6a73e40e48dc6bd99c5cbfd75 | l3_agent |

Also the initialization creates topic with double node suffix, e.g. l3_agent.ubuntu-ilya.ubuntu-ilya, not harmful, but useless.

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/148915

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

Reviewed: https://review.openstack.org/148915
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=6da3d014bfa95c979db1d6ce18ba10d629b80481
Submitter: Jenkins
Branch: master

commit 6da3d014bfa95c979db1d6ce18ba10d629b80481
Author: Ilya Shakhat <email address hidden>
Date: Wed Jan 21 15:56:19 2015 +0300

    Do not duplicate message consumers

    Oslo.messaging creates node topic (with node name as suffix)
    and fanout topic automatically. There's no need to do this
    in Neutron code.

    Closes bug 1413156

    Change-Id: Ic790cab648b213b55679038967fef12eb5cec606

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

Reviewed: https://review.openstack.org/150037
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=81f1a7b2042ee65b34fe7731d4517c7f8831544d
Submitter: Jenkins
Branch: stable/juno

commit 81f1a7b2042ee65b34fe7731d4517c7f8831544d
Author: Ilya Shakhat <email address hidden>
Date: Wed Jan 21 15:56:19 2015 +0300

    Do not duplicate message consumers

    Oslo.messaging creates node topic (with node name as suffix)
    and fanout topic automatically. There's no need to do this
    in Neutron code.

    Closes bug 1413156

    Change-Id: Ic790cab648b213b55679038967fef12eb5cec606
    (cherry picked from commit 6da3d014bfa95c979db1d6ce18ba10d629b80481)

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