Nova live-migration fails because duplicate records in neutron's ml2_port_bindings table
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Env: Ussuri environment with 1 controller + 2 compute nodes.
Reproduce steps:
1. Create a VM at comp;
2. Live-migrate the VM from comp to comp2;
3. Live-migration success;
4. Live-migrate the VM from the comp2 to comp;
5. Live migration fail with error "No valid host was found."
Detail error msg:
2020-10-21 03:37:59.622 984895 ERROR nova.network.
I find that there are duplicate records in the neutron's "ml2_port_bindings" table:
MariaDB [neutron]> select * from ml2_port_bindings where port_id=
+------
| port_id | host | vif_type | vnic_type | profile | vif_details
+------
| 71c3a3c7-
| 71c3a3c7-
+------
After removing the "INACTIVE" record, I do the step4( live migrate the VM from host2 to host1 ) success.
I find a similar bug at https:/
description: | updated |
description: | updated |
tags: | added: live-migration neutron |
tags: | added: invalid |
as part of step 3 when the post live migration task runs it activates the dest port binding which deactivates all other port binding e.g. the one for the souce compute node. and then it later deletes the source port binding.
from what you desciribe it looks like that souce node binding is not being deleted for some reason.,
can you check the nova comptue logs on both the source and dest for any excpetion related to this and provdie them here.
we have a tempest test in the migration job that migrates a vm back and forth between the souce and dest host. so we validate that this workin the ci on every patch that is proposed. so this seam more likely to be an issue in your deployment then a fundemental issue in the code but without logs its hard to tell.
i am setting this to incomplete for now but if you can provide logs of the first live migration so we can confim it correctly cleaned up the source port binding or failed to do so we can take a closer look.