lvm: try and workaround an umount -> lvremove udev timing bug with a time.sleep(1)
--- a/pvl/backup/lvm.py Fri Mar 02 15:39:50 2012 +0200
+++ b/pvl/backup/lvm.py Fri Mar 02 15:40:21 2012 +0200
@@ -77,8 +77,15 @@
yield snapshot
finally:
+ # XXX: there's some timing bug with an umount leaving the LV open, do we need to wait for it to get closed after mount?
+ # https://bugzilla.redhat.com/show_bug.cgi?id=577798
+ # some udev event bug, possibly fixed in lvm2 2.02.86?
+ # try to just patiently wait for it to settle down... if this isn't enough, we need some dmremove magic
+ log.debug("cleanup: waiting for snapshot volume to settle...")
+ import time
+ time.sleep(1)
+
# cleanup
- # XXX: there's some timing bug with an umount leaving the LV open, do we need to wait for it to get closed after mount?
log.debug("cleanup: {0}".format(snapshot))
snapshot.close()