summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2007-06-01 14:58:47 +0000
committerDavid Cantrell <dcantrell@redhat.com>2007-06-01 14:58:47 +0000
commite1fab9fe4b7c21069e9b0f3d39bd66a51520c303 (patch)
tree09914b47f6efeada53382b117144e5f79879873a
parentd8fdd8c43e43952f2ffb9b084ae986c344a5db31 (diff)
downloadanaconda-e1fab9fe4b7c21069e9b0f3d39bd66a51520c303.tar.gz
anaconda-e1fab9fe4b7c21069e9b0f3d39bd66a51520c303.tar.xz
anaconda-e1fab9fe4b7c21069e9b0f3d39bd66a51520c303.zip
* zfcp.py (ZFCPDevice): We need to echo 1 to online for each LUN
we are handed, otherwise the device doesn't become available to anaconda (#207097).
-rw-r--r--ChangeLog6
-rw-r--r--zfcp.py12
2 files changed, 8 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 13cec68c8..063f1c0a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-01 David Cantrell <dcantrell@redhat.com>
+
+ * zfcp.py (ZFCPDevice): We need to echo 1 to online for each LUN
+ we are handed, otherwise the device doesn't become available to
+ anaconda (#207097).
+
2007-06-01 Chris Lumens <clumens@redhat.com>
* iw/release_notes.py (ReleaseNotesViewer.getReleaseNotes): Fall back
diff --git a/zfcp.py b/zfcp.py
index cbd419fb1..8a9ae1b8e 100644
--- a/zfcp.py
+++ b/zfcp.py
@@ -46,8 +46,6 @@ class ZFCPDevice:
if not self.checkValidFCPLun(self.fcplun):
raise ValueError, _("You have not specified a FCP LUN or the number is invalid.")
- self.onlineStatus = False
-
def __str__(self):
return "%s %s %s" %(self.devnum, self.wwpn, self.fcplun)
@@ -110,12 +108,10 @@ class ZFCPDevice:
checkValidWWPN = checkValidFCPLun = checkValid64BitHex
def onlineDevice(self):
- if self.onlineStatus:
- return True
-
online = "%s/%s/online" %(zfcpsysfs, self.devnum)
portadd = "%s/%s/port_add" %(zfcpsysfs, self.devnum)
unitadd = "%s/%s/%s/unit_add" %(zfcpsysfs, self.devnum, self.wwpn)
+
try:
if not os.path.exists(unitadd):
loggedWriteLineToFile(portadd, self.wwpn)
@@ -127,16 +123,13 @@ class ZFCPDevice:
%(self.devnum, e))
return False
- self.onlineStatus = True
return True
def offlineDevice(self):
- if not self.onlineStatus:
- return True
-
offline = "%s/%s/online" %(zfcpsysfs, self.devnum)
portremove = "%s/%s/port_remove" %(zfcpsysfs, self.devnum)
unitremove = "%s/%s/%s/unit_remove" %(zfcpsysfs, self.devnum, self.wwpn)
+
try:
loggedWriteLineToFile(offline, "0")
loggedWriteLineToFile(unitremove, self.fcplun)
@@ -146,7 +139,6 @@ class ZFCPDevice:
%(self.devnum, e))
return False
- self.onlineStatus = False
return True
class ZFCP: