Namespaces not removed when the last VM using a DVR is deleted

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

Bug Description

With DVR, the qrouter- and snat- namespaces are deleted after the last VM using the router is deleted. But the namespaces remain on the node afterwards.

How the problem is reproduced;

1. Create a network, subnet, and router:

   - neutron net-create mynet
   - neutron subnet-create --name sb-mynet mynet 10.1.2.0/24
   - neutron router-create myrouter
   - neutron router-interface-add myrouter sb-mynet
   - neutron router-gateway-set myrouter public

2. Create a VM:

   - nova boot --flavor 1 --key-name <key> --image <cirros-image> --nic net-id=<mynet-uuid> vm1

   After the VM comes boots up, check the VM is pingable

3. Delete the VM.

The router's namespaces remain on the node. They should have been deleted.

Stephen Ma (stephen-ma)
tags: added: l3-dvr-backlog
Changed in neutron:
assignee: nobody → Stephen Ma (stephen-ma)
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This would happen even without booting up VM's, ie. as the at the end of phase 1, we'd remove the interface and delete the router. Would you agree?

Changed in neutron:
status: New → Confirmed
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Is this a duplicate for bug: 1348302?

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

sorry I meant bug #1348302

Changed in neutron:
importance: Undecided → Medium
Revision history for this message
Stephen Ma (stephen-ma) wrote :

Hi, Armando,

Just tried to reproduce the problem as you suggested. The problem didn't happen. After step 1, delete the router interface and delete the router. The router's namespaces are gone.

Stephen Ma (stephen-ma)
Changed in neutron:
status: Confirmed → In Progress
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/112465

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Hi Stephen, are you looking at the compute hosts, the network nodes or both? Also could you confirm whether you see this as a bug of the above mentioned bug?

Thanks,
Armando

Revision history for this message
Stephen Ma (stephen-ma) wrote :

Hi, Armando,

This bug was found on compute hosts. And the fix provided is applicable to fix the compute hosts.

As for the 1348302, it is not the same bug as this one. 1353165 is caused by a notification not being sent to the VM host. Snat- namespace can exists on network nodes. The fix for 1353165 is not going to fix the snat- namespace cleanup problems on network nodes. But it is going to fix the snat- cleanup problem when the VM host is also a network node.

Changed in neutron:
milestone: none → juno-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/112465
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=69ce923ca30faf0865f3d59de4157fec21ed6e0d
Submitter: Jenkins
Branch: master

commit 69ce923ca30faf0865f3d59de4157fec21ed6e0d
Author: Stephen Ma <email address hidden>
Date: Wed Aug 6 22:33:32 2014 +0000

    Delete DVR namespaces on node after removing last VM

    After removing the last VM using a distributed router,
    the router's namespaces are still present on the VM host
    The problem is that the neutron API server sent the router
    remove notification to the L3 agent using the name of the
    host running the L3 agent instead of the agent's uuid. This
    caused an error when sending the notification. So the L3
    agent never had the chance to cleanup the namespace.
    This problem is fixed here.

    Afterwards, it was found that the notification was still not
    sent. The reason is that the router/L3-agent binding has
    already been deleted before the routine that sends the
    router removed notification was called. The notifier routine
    errored out when it tried to delete the same router/L3 agent
    binding. This problem is fixed in this patch by removing the
    binding removal step from the DVR scheduler.

    Change-Id: I6323d7ff438bb6c31e4a794bd3da96bf132fdc85
    Closes-Bug: 1353165

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