FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-07-2008, 06:40 AM
Hans de Goede
 
Default PATCH: Sleep a bit before calling udevsettle in iscsiTarget.login (#470073, #466661)

Hi All,

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.
---
iscsi.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/iscsi.py b/iscsi.py
index 51640b5..6ff69f1 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")


Regards,

Hans

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 11-07-2008, 01:49 PM
Jeremy Katz
 
Default PATCH: Sleep a bit before calling udevsettle in iscsiTarget.login (#470073, #466661)

On Fri, 2008-11-07 at 08:40 +0100, Hans de Goede wrote:
> 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.

Seems okay with one minor nit -- be sure to use spaces instead of tabs

Jeremy

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:55 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org