summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2008-11-07 08:35:23 +0100
committerHans de Goede <hdegoede@redhat.com>2008-11-08 13:23:46 +0100
commit823437ee38d36cce226f29bd5b4c9d56afe8f60d (patch)
tree5673c6edcdb38858c20f4739e8689ff87f63ce31
parent39f27c560defd737641a17b5052734d12e990e83 (diff)
downloadanaconda-823437ee38d36cce226f29bd5b4c9d56afe8f60d.tar.gz
anaconda-823437ee38d36cce226f29bd5b4c9d56afe8f60d.tar.xz
anaconda-823437ee38d36cce226f29bd5b4c9d56afe8f60d.zip
Sleep a bit before calling udevsettle in iscsiTarget.login (#470073, #466661)
Further testing has revealed that it is possible that the hotplug events for an added iscsi disk have not fired yet when iscsiadm ... --login has completed In this case calling udevsettle does not help, so sleep a little before calling udevsettle to give the kernel time to fire of those events.
-rw-r--r--iscsi.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/iscsi.py b/iscsi.py
index 51640b58e..6ff69f10b 100644
--- a/iscsi.py
+++ b/iscsi.py
@@ -191,6 +191,9 @@ class iscsiTarget:
# Wait for udev to create the devices for the just added disks
if ret:
+ # It is possible when we get here the events for the new devices
+ # are not send yet, so sleep to make sure the events are fired
+ time.sleep(1)
iutil.execWithRedirect("/sbin/udevsettle", [ ],
stdout = "/dev/tty5", stderr="/dev/tty5")