DiskNotFound exeption is rised when attaching disk just after VM creation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Description
===========
Faced problem while performing tempest.
Test create 2 volumes, than create VM and than attaches one volume to VM:
https:/
Error appears in 2 ways:
1. exception.
2023-03-13 17:20:41.406 7 ERROR oslo_messaging.
2023-03-13 17:20:41.406 7 ERROR oslo_messaging.
2023-03-13 17:20:41.406 7 ERROR oslo_messaging.
https:/
2. exception.
2023-03-13 23:15:30.319 7 ERROR oslo_messaging.
2023-03-13 23:15:30.319 7 ERROR oslo_messaging.
2023-03-13 23:15:30.319 7 ERROR oslo_messaging.
https:/
It looks like race condition problem because:
- both ways described before have the same root cause but in second case we are moved a bit further cause race condition event came a bit later
- if we add sleep in tempest, the error will disappear and won't been fixed anymore:
server = self.create_
# Attach "volume1" to server
Environment
===========
stable/xena
libvirt/KVM/QEMU
Looks like it is in QEMU/libvirt area as I didn't find any additional calls to qemu from nova libvirt driver, but there is interesting message in nova-compute log just after disk was attached:
2023-03-16 12:04:46.105 7 WARNING nova.virt. libvirt. driver [req-1acb0047- 73a3-485b- b4cf-a20f1210e7 c0 - - - - -] Received event <DeviceRemovedE vent: 1678957486.1054864, 92b8a8d2- 287d-4d6c- b65f-9bc675ecd7 4c => virtio-disk1> from libvirt but the driver is not waiting for it; ignored.
Looks like QEMU removes attached disk by its own, if attachment was made just in time VM was created and started. If we wait couple of seconds and than attach disk - everything goes well