Neutron deletes port in use and nova errors out when cleaning the VM XML
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Expired
|
Undecided
|
Unassigned |
Bug Description
We recently upgraded to OpenStack XENA on a Kolla deployment and we hit this issue
Neutron is able to delete a port in use and Nova errors out when trying to clean up the VM XML (we are talking about Windows VMs on KVM hypervisor).
We need to move the ports from some VMs to a different subnet. We tried the following procedure:
remove the port of a VM
create a new port on the new subnet
attach the new port to the VM
Result:
We have a VM with no network connectivity.
The port gets deleted from OpenStack, and from OVS as well, but in the VM XML we see this:
<interface type='bridge'>
<mac address=
<source bridge='br-int'/>
<virtualport type='openvswitch'>
<parameters interfaceid=
<
<target dev='tapfb15ad8
<model type='virtio'/>
<mtu size='1500'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<interface type='ethernet'>
<mac address=
<target dev='tapba91ea4
<model type='virtio'/>
<mtu size='1500'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</interface>
The bridge part represents the old interface (the interface of the old deleted port) and the ethernet part is the new port.
We also tried to use:
virsh detach-interface in order to remove the stale interface from the XML, the command said it was completed successfully but the interface is still there.
We noticed that rebooting the VM cleans the XML file and the connectivity is back (this is not the desired solution)
In the logs we see:
When we delete the old port:
2022-05-31 12:13:29.935 7 INFO nova.compute.
2022-05-31 12:13:30.076 7 WARNING nova.virt.
2022-05-31 12:13:30.740 7 INFO os_vif [req-1bf9e960-
When we attach the new port:
2022-05-31 12:20:16.427 7 WARNING nova.compute.
2022-05-31 12:20:19.188 7 WARNING nova.compute.
We found that the following workaround works:
we use virsh detach-interface while the old port of the VM exists (before we delete it)
then we delete the old port
after that, we attach the new port
This works as expected and the VM has network connectivity.
summary: |
- Neutron deletes port and nova errors out + Neutron deletes port and nova errors out when cleaning the VM XML |
summary: |
- Neutron deletes port and nova errors out when cleaning the VM XML + Neutron deletes port in use and nova errors out when cleaning the VM XML |
Changed in nova: | |
status: | Incomplete → New |
Changed in nova: | |
status: | Incomplete → New |
I'm not sure this is a neutron issue, as you are allowed to delete a port even if it is in use.
It seems like the issue is with Nova, but before re-assigning, have you tried removing the port via the CLI?
# openstack server remove port <server> <port>
That will probably do the right thing. There is also an 'add port'.