Comment 2 for bug 1492026

Revision history for this message
Matt Riedemann (mriedem) wrote : Re: domain.attachDeviceFlags randomly doesn't do anything in libvirt

My current theory now is that test_stamp_pattern is racing with the volume detach on the first instance/volume combo where the partition isn't gone when we create the volume snapshot (even though cinder says the volume is detach and 'available'). So when we go to attach the volume snapshot to the 2nd instance, maybe there is something on the volume that makes libvirt think the partition is already there and doesn't do the attach. It's still odd that libvirt's virDomainAttachDeviceFlags wouldn't log a debug statement at all in that case - even if it was just ignoring it thinking it's already there - or raise an error or something. To test this, we can add some code to test_stamp_pattern to wait for the partition to be gone from the instance after we've detached the volume but before we take the snapshot of the volume.