nova allows booting two instances with the same neutron port in parallel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Medium
|
Balazs Gibizer | ||
neutron |
Invalid
|
Medium
|
Kevin Benton |
Bug Description
It seems that to reproduce the problem we need a multi node deployment with at least two nova-compute service.
To reproduce it do the following:
1) create a neutron port
2) boot two instances in parallel with that port
Sometimes both instances become ACTIVE in nova which is clearly wrong.
vagrant@
+------
| id | name | subnets |
+------
| fc257a00-
| | | a923871f-
| 7a057b12-
| | | ee70023c-
+------
vagrant@
Created a new port:
+------
| Field | Value |
+------
| admin_state_up | True |
| allowed_
| binding:host_id | |
| binding:profile | {} |
| binding:vif_details | {} |
| binding:vif_type | unbound |
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "ee70023c-
| | {"subnet_id": "04f3b138-
| id | f2da8f78-
| mac_address | fa:16:3e:0c:28:5d |
| name | |
| network_id | 7a057b12-
| port_security_
| security_groups | 73853e74-
| status | DOWN |
| tenant_id | 16f8c1dbfa2d472
+------
vagrant@
[1] 18785
[2] 18786
vagrant@
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 24e67346-
| d90292a2-
+------
Based on the code we have an atomicity problem on the neutron REST API:
At https:/
So it is possible that two nova-compute processes check the port status before one of them sets the device_id, so as a result both nova-compute will think that the port are free to use and the slower nova-compute will overwrite the device_id of the port.
Changed in nova: | |
assignee: | nobody → Balazs Gibizer (balazs-gibizer) |
Changed in nova: | |
status: | In Progress → Invalid |
Changed in neutron: | |
status: | In Progress → Invalid |
Fix proposed to branch: master /review. openstack. org/221803
Review: https:/