yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #37503
[Bug 1219795] Re: Inconsistent DHCP port creation
*** This bug is a duplicate of bug 1431105 ***
https://bugs.launchpad.net/bugs/1431105
I think this can be closed, as it was fixed in:
https://review.openstack.org/#/c/163672/
** This bug has been marked a duplicate of bug 1431105
dhcp scheduling is racey with first port creation
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1219795
Title:
Inconsistent DHCP port creation
Status in neutron:
In Progress
Bug description:
When creating a subnet, the DHCP port is not being created until another
port is created. That is, unless ports have been created on the network.
And a call to create a subnet will return before the DHCP port is established
(if that occurs), which produces a race condition if creating a port immediately after creating the subnet.
This is easier is explain by example :)
The following can be run from a shell script to reproduce the issue:
neutron net-create test_net
neutron subnet-create test_net 198.18.0.0/24
neutron subnet-create test_net 2001:db8:abc:123::/64 --ip-version 6
sleep 5 # just to be sure
neutron port-list
# dhcp port has not been created yet
neutron port-create test_net --name test_port
# the dhcp port is created after the test_port.
# apparently before the port-create command returns,
# as no sleep is needed before the port-list.
neutron port-list
# test_port assigned 198.18.0.2 and 2001:db8:abc:123::2
# dhcp port assigned 198.18.0.3 and 2001:db8:abc:123::3
neutron port-delete test_port
neutron net-delete test_net
neutron net-create test_net
# this add/remove port before subnet creation causes the dhcp port
# to be setup when the subnets are created.
neutron port-create test_net --name test_port
neutron port-delete test_port
neutron subnet-create test_net 198.18.0.0/24
neutron subnet-create test_net 2001:db8:abc:123::/64 --ip-version 6
sleep 5 # subnet-create returns before the dhcp port is setup
neutron port-list
# dhcp port assigned 198.18.0.2 and 2001:db8:abc:123::2
neutron port-create test_net --name test_port
neutron port-list
# test_port assigned 198.18.0.3 and 2001:db8:abc:123::3
neutron port-delete test_port
neutron net-delete test_net
# this creates a condition where if you create the test_port
# after the subnets without sleeping, the test_port gets the ::2 ipv6
# address before the dhcp port.
neutron net-create test_net
neutron port-create test_net --name test_port
neutron port-delete test_port
neutron subnet-create test_net 198.18.0.0/24
neutron subnet-create test_net 2001:db8:abc:123::/64 --ip-version 6
neutron port-create test_net --name test_port
sleep 5 # in order to see the dhcp port
neutron port-list
# test_port assigned 198.18.0.3 and 2001:db8:abc:123::2
# dhcp port assigned 198.18.0.2 and 2001:db8:abc:123::3
neutron port-delete test_port
neutron net-delete test_net
It seems the solution would be to make sure the DHCP port check is performed
after a subnet is created/updated, and not return until that is completed.
It doesn't seem like this would be necessary when creating/updating a port.
(unless it's the DHCP port that's being modified?)
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1219795/+subscriptions