Neutron server doesn't wait for port DHCP provisioning while VM creation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
In Progress
|
Undecided
|
Anton Kurbatov |
Bug Description
I found that neutron-server does not wait for successful port provisioning from the dhcp agent in the case of VM creation. DHCP entity is not added into provisioning_block by neutron-server for such port.
As a result, nova receives a notification that the port is plugged, while the DHCP agent is still processing the port or even getting an error during processing.
Steps to reproduce on devstack from master:
- make port_create_end method fail in DHCP agent side [1]
- create a VM with network with DHCP enabled
VM is successfully created, port is active, while the DHCP entry for this port is not configured.
[root@node0 neutron]# git diff
diff --git a/neutron/
index 7349d7e297.
--- a/neutron/
+++ b/neutron/
@@ -676,6 +676,7 @@ class DhcpAgent(
+ raise Exception('fail for testing purposes')
@_
[root@node0 neutron]# openstack server create test-vm --network net1 --flavor m1.tiny --image cirros-
[root@node0 ~]# openstack server list
+------
| ID | Name | Status | Networks | Image | Flavor |
+------
| cce75084-
+------
[root@node0 ~]# openstack port list --device-id cce75084-
+------
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+------
| d7e55e08-
+------
[root@node0 ~]#
[root@node0 ~]# cat /opt/stack/
[root@node0 ~]#
While VM creation there two API calls from the nova:
1) Port 'create' API call:
Nov 22 16:19:40 node0 neutron-
2) Port 'update' API call:
Nov 22 16:16:11 node0 neutron-
For the port creation API call a DHCP provisioning is not setup because device_owner is absent [2]
For the port 'update' API call a DCHP provisioning is not setup because none of the fixed_ips/
[1] https:/
[2] https:/
[3] https:/
Changed in neutron: | |
assignee: | nobody → Anton Kurbatov (akurbatov) |
Hi, so you suggest if I understand well to wait for provisioning in case of update of the port, for example by checking if the device_owner was set during the update?