neutron l3-agent-router-remove is not unscheduling dvr routers from L3-agents

Bug #1489091 reported by Stephen Ma
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Stephen Ma

Bug Description

In my environment where there is a compute node and a controller node.
On the compute node the L3-agent mode is 'dvr'.
On the controller node the L3-agent mode is 'dvr-snat'.
Nova-compute is only running on the compute node.

Start: the compute node has no VMs running, there are no namespaces on the compute node.

1. Created a network and a router
   neutron net-create my-net
   neutron subnet-create sb-my-net my-net 10.1.2.0/24
   neutron router-create my-router
   neutron router-interface-add my-router sb-my-net
   neutron router-gateway-set my-router public

my-net's UUID is 1162f283-6efc-424a-af37-0fbeeaf5d02a
my-router's UUID is 4f357733-9320-4c67-a0f6-81054d40fdaa

2. Boot a VM
   nova boot --flavor 1 --image <IMAGE> --nic net-id=1162f283-6efc-424a-af37-0fbeeaf5d02a myvm
   - The VM is hosted on the compute node.

3. Assign a floating IP to the VM
    neutron port-list --device-id <vm-uuid>
    neutron floatingip-create --port-id <vm-port-uuid> public

The fip namespace and the qrouter- 4f357733-9320-4c67-a0f6-81054d40fdaa is found on the compute node.

4. Delete the VM. On the compute node, the fip namespace went away as expected. But the qrouter namespace is left behind, but it should have been deleted. Neutron l3-agent-list-hosting-router shows the router is still scheduled on the compute node's L3-agent.
stack@Dvr-Ctrl2:~/DEVSTACK/manage$ nova list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
stack@Dvr-Ctrl2:~/DEVSTACK/manage$ ./osadmin neutron l3-agent-list-hosting-router 4f357733-9320-4c67-a0f6-81054d40fdaa
+--------------------------------------+-------------+----------------+-------+----------+
| id | host | admin_state_up | alive | ha_state |
+--------------------------------------+-------------+----------------+-------+----------+
| 4fb0bc93-2e6b-46c7-9ccd-3c66d1f44cfc | Dvr-Ctrl2 | True | :-) | |
| 733e31eb-b49e-488b-aaf1-0dbcda802f66 | DVR-Compute | True | :-) | |
+--------------------------------------+-------------+----------------+-------+----------+

5. Attempt to use neutron l3-agent-router-remove to remove the router from the compute node's L3-agent also didn't work. The router is still scheduled on the agent.
stack@Dvr-Ctrl2:~/DEVSTACK/manage$ ./osadmin neutron l3-agent-router-remove 733e31eb-b49e-488b-aaf1-0dbcda802f66 4f357733-9320-4c67-a0f6-81054d40fdaa
Removed router 4f357733-9320-4c67-a0f6-81054d40fdaa from L3 agent

stack@Dvr-Ctrl2:~/DEVSTACK/manage$ ./osadmin neutron l3-agent-list-hosting-router 4f357733-9320-4c67-a0f6-81054d40fdaa
+--------------------------------------+-------------+----------------+-------+----------+
| id | host | admin_state_up | alive | ha_state |
+--------------------------------------+-------------+----------------+-------+----------+
| 4fb0bc93-2e6b-46c7-9ccd-3c66d1f44cfc | Dvr-Ctrl2 | True | :-) | |
| 733e31eb-b49e-488b-aaf1-0dbcda802f66 | DVR-Compute | True | :-) | |
+--------------------------------------+-------------+----------------+-------+----------+

The errors in (4) and (5) did not happen on the stable/kilo or the stable/juno code:
   i.) In (4) the router should no longer be scheduled on the compute node's L3 agent.
   ii.) In (5) neutron l3-agent-router-remove should removed the router from the compute node's L3 agent.

Both (4) and (5) indicates that no notification to remove the router is sent to the L3-agent on the compute node. They represent regressions in the latest neutron code.

Stephen Ma (stephen-ma)
description: updated
Stephen Ma (stephen-ma)
Changed in neutron:
assignee: nobody → Stephen Ma (stephen-ma)
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/217516

Changed in neutron:
status: New → In Progress
Changed in neutron:
importance: Undecided → High
Changed in neutron:
milestone: none → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/217516
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3de01b39b74d0a23f765b1f9b1a4ba1eb457068c
Submitter: Jenkins
Branch: master

commit 3de01b39b74d0a23f765b1f9b1a4ba1eb457068c
Author: Stephen Ma <email address hidden>
Date: Thu Aug 27 04:50:14 2015 +0000

    Resolve issue where router can't be removed from L3-agent in dvr mode

    Fixes the problem where the L3 DVR Scheduler is unable
    to remove a DVR router from a L3 agent running in
    'dvr' mode.

    Closes-bug: 1489091
    Change-Id: Id128a81d2cf7108936715ee305012fbff23ffdbf

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

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/224334

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: feature/pecan
Review: https://review.openstack.org/224357

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (feature/pecan)
Download full text (73.6 KiB)

Reviewed: https://review.openstack.org/224357
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fdc3431ccd219accf6a795079d9b67b8656eed8e
Submitter: Jenkins
Branch: feature/pecan

commit fe236bdaadb949661a0bfb9b62ddbe432b4cf5f1
Author: Miguel Angel Ajo <email address hidden>
Date: Thu Sep 3 15:40:12 2015 +0200

    No network devices on network attached qos policies

    Network devices, like internal router legs, or dhcp ports
    should not be affected by bandwidth limiting rules.

    This patch disables application of network attached policies
    to network/neutron owned ports.

    Closes-bug: #1486039
    DocImpact

    Change-Id: I75d80227f1e6c4b3f5fa7762b8dc3b0c0f1abd46

commit db4a06f7caa20a4c7879b58b20e95b223ed8eeaf
Author: Ken'ichi Ohmichi <email address hidden>
Date: Wed Sep 16 10:04:32 2015 +0000

    Use tempest-lib's token_client

    Now tempest-lib provides token_client modules as library and the
    interface is stable. So neutron repogitory doesn't need to contain
    these modules.
    This patch makes neutron use tempest-lib's token_client and removes
    the own modules for the maintenance.

    Change-Id: Ieff7eb003f6e8257d83368dbc80e332aa66a156c

commit 78aed58edbe6eb8a71339c7add491fe9de9a0546
Author: Jakub Libosvar <email address hidden>
Date: Thu Aug 13 09:08:20 2015 +0000

    Fix establishing UDP connection

    Previously, in establish_connection() for UDP protocol data were sent
    but never read on peer socket. That lead to successful read on peer side
    if this connection was filtered. Having constant testing string masked
    this issue as we can't distinguish to which test of connectivity data
    belong.

    This patch makes unique data string per test_connectivity() and
    also makes establish_connection() to create an ASSURED entry in
    conntrack table. Finally, in last test after firewall filter was
    removed, connection is re-established in order to avoid troubles with
    terminated processes or TCP continuing sending packets which weren't
    successfully delivered.

    Closes-Bug: 1478847
    Change-Id: I2920d587d8df8d96dc1c752c28f48ba495f3cf0f

commit e6292fcdd6262434a7b713ad8802db6bc8a6d3dc
Author: YAMAMOTO Takashi <email address hidden>
Date: Wed Sep 16 13:20:51 2015 +0900

    ovsdb: Fix a few docstring

    Change-Id: I53e1e21655b28fe5da60e58aeeb7cbbd103ae014

commit c22949a4449d96a67caa616290cf76b67b182917
Author: fumihiko kakuma <email address hidden>
Date: Wed Sep 16 11:52:59 2015 +0900

    Remove requirements.txt for the ofagent mechanism driver

    It is no longer used.

    Related-Blueprint: core-vendor-decomposition
    https://blueprints.launchpad.net/neutron/+spec/core-vendor-decomposition

    Change-Id: Ib31fb3febf8968e50d86dd66e1e6e1ea2313f8ac

commit d1d4de19d85f961d388c91e70f31b3bafec418c5
Author: Kevin Benton <email address hidden>
Date: Thu Sep 3 20:25:57 2015 -0700

    Always return iterables in L3 get_candidates

    The caller of this function expects iterables.

    Closes-Bug: #1494996
    Change-Id: I3d103e63f4e127a77268502415c0ddb0d804b54a

commit 1ad6ac448067306...

tags: added: in-feature-pecan
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (feature/pecan)

Change abandoned by Doug Wiegley (<email address hidden>) on branch: feature/pecan
Review: https://review.openstack.org/224334

Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-rc1 → 7.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/246675

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

Reviewed: https://review.openstack.org/246675
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=427c7dcc0019ffad3976c528cdf0bf466847f12c
Submitter: Jenkins
Branch: stable/kilo

commit 427c7dcc0019ffad3976c528cdf0bf466847f12c
Author: Stephen Ma <email address hidden>
Date: Thu Aug 27 04:50:14 2015 +0000

    Resolve issue where router can't be removed from L3-agent in dvr mode

    Fixes the problem where the L3 DVR Scheduler is unable
    to remove a DVR router from a L3 agent running in
    'dvr' mode.

    Closes-bug: 1489091
    Change-Id: Id128a81d2cf7108936715ee305012fbff23ffdbf
    (cherry picked from commit 3de01b39b74d0a23f765b1f9b1a4ba1eb457068c)

tags: added: in-stable-kilo
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.