Cast unnecessary notification over l3_agent with admin_state_up False

Bug #1410841 reported by Hirofumi Ichihara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
YAMAMOTO Takashi

Bug Description

When users update router hosted by l3_agent, neutron server casts unnecessary notification even if the l3_agent is set admin_state_up False .

$ neutron --os-username admin --os-password openstack l3-agent-list-hosting-router router1
+--------------------------------------+--------------------------+----------------+-------+
| id | host | admin_state_up | alive |
+--------------------------------------+--------------------------+----------------+-------+
| 25991a37-5f6c-41bb-a80f-c2e41cdc3a0f | vagrant-ubuntu-trusty-64 | False | :-) |
+--------------------------------------+--------------------------+----------------+-------+

$ neutron router-interface-add router1 subnet
Added interface d0985c72-08d0-4f87-b825-9dba1d257823 to router router1.

l3_agent log:
2015-01-14 15:18:46.937 DEBUG neutron.agent.l3.agent [req-1ecc6f52-49c7-4e3a-aa98-a949aefc65cd demo e7f0cdeb333c4b21a9acdacbe9b50a86] Got routers updated notification :[u'154aa9bd-4950-4ccc-a26f-c9278f9da0c4'] from (pid=11845) routers_updated /opt/stack/neutron/neutron/agent/l3/agent.py:977
2015-01-14 15:18:46.937 DEBUG neutron.agent.l3.agent [req-1ecc6f52-49c7-4e3a-aa98-a949aefc65cd demo e7f0cdeb333c4b21a9acdacbe9b50a86] Starting router update for 154aa9bd-4950-4ccc-a26f-c9278f9da0c4 from (pid=11845) _process_router_update /opt/stack/neutron/neutron/agent/l3/agent.py:1051
2015-01-14 15:18:46.953 WARNING neutron.agent.l3.agent [req-1ecc6f52-49c7-4e3a-aa98-a949aefc65cd demo e7f0cdeb333c4b21a9acdacbe9b50a86] Info for router 154aa9bd-4950-4ccc-a26f-c9278f9da0c4 were not found. Skipping router removal

Changed in neutron:
assignee: nobody → Hirofumi Ichihara (ichihara-hirofumi)
Revision history for this message
Kevin Benton (kevinbenton) wrote :

The meaning of admin_state_up is under discussion now. See this thread.[1]

If we go the way of admin_state_up only indicating scheduling candidacy, then this is behaving just as we would want it.

1. http://lists.openstack.org/pipermail/openstack-dev/2015-January/053782.html

Changed in neutron:
status: New → Opinion
Revision history for this message
Hirofumi Ichihara (ichihara-hirofumi) wrote :

I know the discussion.
I checked the patch[1]. If I understand it right, it doesn't intend to break current behavior.
So this problem remains.

[1] https://review.openstack.org/#/c/147032/

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

Changed in neutron:
status: Opinion → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Hirofumi Ichihara (<email address hidden>) on branch: master
Review: https://review.openstack.org/148821
Reason: Duplication https://review.openstack.org/#/c/149458/

Changed in neutron:
assignee: Hirofumi Ichihara (ichihara-hirofumi) → YAMAMOTO Takashi (yamamoto)
Kyle Mestery (mestery)
Changed in neutron:
milestone: none → kilo-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 5a480be4a806e9f9b6e87f217a43fcc5fd8553dc
Author: YAMAMOTO Takashi <email address hidden>
Date: Tue Jan 27 15:32:19 2015 +0900

    Fix a usage error of joinedload + filter in l3 scheduler

    This commit fixes admin_state_up filtering in
    get_l3_agents_hosting_routers. Also, adapt its callers
    which rely on the current broken implementation.

    Details:

    With the current coding, joinedload() produces a JOIN and
    the following filter() on the columns from the joined table
    would create another JOIN of the same table. (As t1 in the
    following example). It doesn't seem to be the intended
    behaviour. As a consequence the filter (WHERE clause in
    the following examples) doesn't work as expected.

    Queries before this fix looked like the following,
    where t1 and t2 are Agent and RouterL3AgentBinding respectively:

        SELECT t2.aaa, t1_1.bbb, ...
        FROM t1, t2 LEFT OUTER JOIN t1 AS t1_1 ON t1_1.ccc = t2.ddd
        WHERE t1.eee = ...;

    After the fix, it would be:

        SELECT t2.aaa, t1.bbb, ...
        FROM t2 JOIN t1 ON t1.ccc = t2.ddd
        WHERE t1.eee = ...;

    Reference: http://docs.sqlalchemy.org/en/rel_0_9/orm/loading_relationships.html#contains-eager

    Partial-Bug: #1414905
    Closes-Bug: #1410841
    Change-Id: I2243cdfda5c6fe5ef67f96e3274d5381a6e50e62

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

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/167919

Kyle Mestery (mestery)
Changed in neutron:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/juno)

Change abandoned by Arnaud Morin (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/167919
Reason: need more work to be merge correctly in juno release

Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-rc1 → 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.