yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #49092
[Bug 1567049] [NEW] DHCP agent not reusing iface device when namespace is missing
Public bug reported:
Using neutron master with devstack all-in-one installation.
Under specific circumstances, the neutron dhcp agent (with dnsmasq
driver) will incorrectly create a new interface device rather than
reusing the existing one if the network's namespace is accidentally
deleted.
1. Neutron net created.
2. Neutron subnet created for network in step #1 with dhcp enabled.
3. Network dhcp namespace accidentally deleted.
4. New subnet added to network in #1 with dhcp enabled.
--> DHCP agent incorrectly creates a new interface device rather than reusing the existing. The initial iface is now "orphaned".
The script below reproduces the error on my devstack all-in-one:
------------
#!/bin/bash
source ~/devstack/openrc admin admin
neutron net-create dhcp-net
echo "Interfaces before..."
sudo ovs-vsctl show
neutron subnet-create dhcp-net 192.168.1.0/24 --name dhcp-subnet1
sleep 2
for ns in `sudo ip netns list | grep qdhcp-*`; do
echo "Deleting namespace $ns"
sudo ip netns delete ${ns}
done
neutron subnet-create dhcp-net 192.168.2.0/24 --name dhcp-subnet2
sleep 2
neutron net-delete dhcp-net
sleep 2
echo "Interfaces after..."
sudo ovs-vsctl show
------------
Sample ovs output from running the script:
--------
...
Interfaces before...
0b073a08-021d-49d9-b176-5008bf87ae39
Manager "tcp:127.0.0.1:6632"
Bridge br-int
Port br-int
Interface br-int
type: internal
ovs_version: "2.0.2"
...
Interfaces after...
0b073a08-021d-49d9-b176-5008bf87ae39
Manager "tcp:127.0.0.1:6632"
Bridge br-int
Port br-int
Interface br-int
type: internal
Port "tapcf35e3b7-06"
Interface "tapcf35e3b7-06"
ovs_version: "2.0.2"
--------
As shown in the output, a port device is left over, even after the
network + subnets are deleted.
** Affects: neutron
Importance: Undecided
Assignee: Boden R (boden)
Status: New
** Changed in: neutron
Assignee: (unassigned) => Boden R (boden)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1567049
Title:
DHCP agent not reusing iface device when namespace is missing
Status in neutron:
New
Bug description:
Using neutron master with devstack all-in-one installation.
Under specific circumstances, the neutron dhcp agent (with dnsmasq
driver) will incorrectly create a new interface device rather than
reusing the existing one if the network's namespace is accidentally
deleted.
1. Neutron net created.
2. Neutron subnet created for network in step #1 with dhcp enabled.
3. Network dhcp namespace accidentally deleted.
4. New subnet added to network in #1 with dhcp enabled.
--> DHCP agent incorrectly creates a new interface device rather than reusing the existing. The initial iface is now "orphaned".
The script below reproduces the error on my devstack all-in-one:
------------
#!/bin/bash
source ~/devstack/openrc admin admin
neutron net-create dhcp-net
echo "Interfaces before..."
sudo ovs-vsctl show
neutron subnet-create dhcp-net 192.168.1.0/24 --name dhcp-subnet1
sleep 2
for ns in `sudo ip netns list | grep qdhcp-*`; do
echo "Deleting namespace $ns"
sudo ip netns delete ${ns}
done
neutron subnet-create dhcp-net 192.168.2.0/24 --name dhcp-subnet2
sleep 2
neutron net-delete dhcp-net
sleep 2
echo "Interfaces after..."
sudo ovs-vsctl show
------------
Sample ovs output from running the script:
--------
...
Interfaces before...
0b073a08-021d-49d9-b176-5008bf87ae39
Manager "tcp:127.0.0.1:6632"
Bridge br-int
Port br-int
Interface br-int
type: internal
ovs_version: "2.0.2"
...
Interfaces after...
0b073a08-021d-49d9-b176-5008bf87ae39
Manager "tcp:127.0.0.1:6632"
Bridge br-int
Port br-int
Interface br-int
type: internal
Port "tapcf35e3b7-06"
Interface "tapcf35e3b7-06"
ovs_version: "2.0.2"
--------
As shown in the output, a port device is left over, even after the
network + subnets are deleted.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1567049/+subscriptions
Follow ups