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 12-11-2009, 01:12 PM
Martin Sivak
 
Default Some iscsi cleanups

Looks OK.
Martin

----- "Hans de Goede" <hdegoede@redhat.com> wrote:

> -Improve iscsi error logging
> -Use udev_settle from udev.py instead of calling udevadm ourselves
> ---
> storage/iscsi.py | 16 +++++++++-------
> 1 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/storage/iscsi.py b/storage/iscsi.py
> index e5e696a..5bf6d28 100644
> --- a/storage/iscsi.py
> +++ b/storage/iscsi.py
> @@ -19,6 +19,7 @@
> #
>
> from constants import *
> +from udev import *
> import os
> import iutil
> from flags import flags
> @@ -84,9 +85,7 @@ def stabilize(intf = None):
> # 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(2)
> - iutil.execWithRedirect("udevadm", [ "settle" ],
> - stdout = "/dev/tty5", stderr="/dev/tty5",
> - searchPath = 1)
> + udev_settle()
> if intf:
> w.pop()
>
> @@ -138,9 +137,9 @@ class iscsi(object):
> node.login()
> self.nodes.append(node)
> self.ibftNodes.append(node)
> - except:
> - # FIXME, what to do when we cannot log in to a
> firmware
> - # provided node ??
> + except IOError, e:
> + log.error("Could not log into ibft iscsi target %s:
> %s" %
> + (node.name, str(e)))
> pass
>
> stabilize(intf)
> @@ -228,7 +227,10 @@ class iscsi(object):
> node.login()
> self.nodes.append(node)
> logged_in = logged_in + 1
> - except:
> + except IOError, e:
> + log.warning(
> + _("Could not log into discovered iscsi target %s:
> %s" %
> + (node.name, str(e)))
> # some nodes may require different credentials
> pass
>
> --
> 1.6.5.2
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 12-11-2009, 01:19 PM
Hans de Goede
 
Default Some iscsi cleanups

-Improve iscsi error logging
-Use udev_settle from udev.py instead of calling udevadm ourselves
---
storage/iscsi.py | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/storage/iscsi.py b/storage/iscsi.py
index e5e696a..5bf6d28 100644
--- a/storage/iscsi.py
+++ b/storage/iscsi.py
@@ -19,6 +19,7 @@
#

from constants import *
+from udev import *
import os
import iutil
from flags import flags
@@ -84,9 +85,7 @@ def stabilize(intf = None):
# 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(2)
- iutil.execWithRedirect("udevadm", [ "settle" ],
- stdout = "/dev/tty5", stderr="/dev/tty5",
- searchPath = 1)
+ udev_settle()
if intf:
w.pop()

@@ -138,9 +137,9 @@ class iscsi(object):
node.login()
self.nodes.append(node)
self.ibftNodes.append(node)
- except:
- # FIXME, what to do when we cannot log in to a firmware
- # provided node ??
+ except IOError, e:
+ log.error("Could not log into ibft iscsi target %s: %s" %
+ (node.name, str(e)))
pass

stabilize(intf)
@@ -228,7 +227,10 @@ class iscsi(object):
node.login()
self.nodes.append(node)
logged_in = logged_in + 1
- except:
+ except IOError, e:
+ log.warning(
+ _("Could not log into discovered iscsi target %s: %s" %
+ (node.name, str(e)))
# some nodes may require different credentials
pass

--
1.6.5.2

_______________________________________________
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 09:09 AM.

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