Comment 4 for bug 1914664

Revision history for this message
Lee Yarwood (lyarwood) wrote : Re: QEMU monitor read failure in AttachInterfacesTest

Thanks for pointing to that gibi.

Ignoring c#2 now, talking to Dan it looks like this is a race in the cleanup code for AttachInterfacesTestJSON where n-cpu was handling a request (req-77f51485-cbc2-4f2a-8a6d-4a8ed910e585) to detach an interface when another request (req-1547ac08-96e2-4878-a7d2-b71a33849aad) to delete the instance came in causing the monitor error as we destroyed the domain.

I wonder if detach_interface [1] should be taking an instance.uuid lock instead of an interface specific lock? We already do this for detach_volume [2] that would stop the same happening there when terminate_instance [3] is called, taking an instance.uuid lock.

[1] https://github.com/openstack/nova/blob/fec44e5d38baa0232bf41367303b82dc332eb512/nova/compute/manager.py#L7730-L7738
[2] https://github.com/openstack/nova/blob/fec44e5d38baa0232bf41367303b82dc332eb512/nova/compute/manager.py#L7145-L7165
[3] https://github.com/openstack/nova/blob/fec44e5d38baa0232bf41367303b82dc332eb512/nova/compute/manager.py#L3018-L3055