I was not able to reproduce this issue on master in a multinode devstack.
Could you please attach the debug logs from the two nova-compute services from the reproduction?
How frequently could the problem be reproduced? Once in 10 attempts or 100 attempts?
Nova does consider ongoing migrations even if the instance is not assigned to the given host[1]. During evacuation we do have a Migration object[2]. This object is created at [3]. At that point destination only set if the evacuation is forced to a target host.
Later during the rebuild_instance there is a claim. That claim updates the migration object[4][5]. Also the _move_claim[6] first updates the migration object and then claims the pci devices. So I don't see how this can race with the _update_available_resource() run.
I mark this bug Incomplete as I don't have a reproduction and I don't see how the described race happens. If you have any more input or idea then please set it back to New.
I was not able to reproduce this issue on master in a multinode devstack.
Could you please attach the debug logs from the two nova-compute services from the reproduction?
How frequently could the problem be reproduced? Once in 10 attempts or 100 attempts?
Nova does consider ongoing migrations even if the instance is not assigned to the given host[1]. During evacuation we do have a Migration object[2]. This object is created at [3]. At that point destination only set if the evacuation is forced to a target host.
Later during the rebuild_instance there is a claim. That claim updates the migration object[4][5]. Also the _move_claim[6] first updates the migration object and then claims the pci devices. So I don't see how this can race with the _update_ available_ resource( ) run.
I mark this bug Incomplete as I don't have a reproduction and I don't see how the described race happens. If you have any more input or idea then please set it back to New.
[1] https:/ /github. com/openstack/ nova/blob/ 5645f75d6b3adac 00f6be8e0eae456 5c4eb2ab5d/ nova/pci/ manager. py#L346- L353 /github. com/openstack/ nova/blob/ 5645f75d6b3adac 00f6be8e0eae456 5c4eb2ab5d/ nova/compute/ manager. py#L3135 /github. com/openstack/ nova/blob/ b5330a97ae6f874 b75fa9588ae122a 1d1e827035/ nova/compute/ api.py# L5206-L5209 /github. com/openstack/ nova/blob/ 5645f75d6b3adac 00f6be8e0eae456 5c4eb2ab5d/ nova/compute/ resource_ tracker. py#L282 /github. com/openstack/ nova/blob/ 5645f75d6b3adac 00f6be8e0eae456 5c4eb2ab5d/ nova/compute/ resource_ tracker. py#L393 /github. com/openstack/ nova/blob/ 5645f75d6b3adac 00f6be8e0eae456 5c4eb2ab5d/ nova/compute/ resource_ tracker. py#L282- L322
[2] https:/
[3] https:/
[4] https:/
[5] https:/
[6] https:/