summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyanaconda/cmdline.py7
-rw-r--r--pyanaconda/installinterfacebase.py139
-rw-r--r--pyanaconda/rescue.py18
-rw-r--r--pyanaconda/storage/__init__.py81
-rw-r--r--pyanaconda/storage/devicetree.py124
-rw-r--r--pyanaconda/storage/errors.py7
-rw-r--r--pyanaconda/storage/fcoe.py20
-rw-r--r--pyanaconda/storage/iscsi.py25
-rw-r--r--pyanaconda/storage/zfcp.py3
9 files changed, 63 insertions, 361 deletions
diff --git a/pyanaconda/cmdline.py b/pyanaconda/cmdline.py
index f45ea93f4..b5ab47970 100644
--- a/pyanaconda/cmdline.py
+++ b/pyanaconda/cmdline.py
@@ -156,13 +156,6 @@ class InstallInterface(InstallInterfaceBase):
while 1:
time.sleep(5)
- def questionInitializeDASD(self, c, devs):
- print(_("Can't have a question in command line mode!"))
- print("questionInitializeDASD")
- # don't exit
- while 1:
- time.sleep(5)
-
def mainExceptionWindow(self, shortText, longTextFile):
print(shortText)
diff --git a/pyanaconda/installinterfacebase.py b/pyanaconda/installinterfacebase.py
index b0b8d9343..580c18937 100644
--- a/pyanaconda/installinterfacebase.py
+++ b/pyanaconda/installinterfacebase.py
@@ -28,11 +28,6 @@ import logging
log = logging.getLogger("anaconda")
class InstallInterfaceBase(object):
- def __init__(self):
- self._warnedUnusedRaidMembers = []
- self._initLabelAnswers = {}
- self._inconsistentLVMAnswers = {}
-
def reinitializeWindow(self, title, path, size, description):
raise NotImplementedError
@@ -63,140 +58,6 @@ class InstallInterfaceBase(object):
custom_buttons=[_("Exit installer")])
sys.exit(0)
- def unusedRaidMembersWarning(self, unusedRaidMembers):
- """Warn about unused BIOS RAID members"""
- unusedRaidMembers = \
- filter(lambda m: m not in self._warnedUnusedRaidMembers,
- unusedRaidMembers)
- if unusedRaidMembers:
- self._warnedUnusedRaidMembers.extend(unusedRaidMembers)
- unusedRaidMembers.sort()
- self.messageWindow(_("Warning"),
- P_("Disk %(unusedRaidMems)s contains BIOS RAID metadata, but is not part of "
- "any recognized BIOS RAID sets. Ignoring disk %(unusedRaidMems)s.",
- "Disks %(unusedRaidMems)s contain BIOS RAID metadata, but are not part of "
- "any recognized BIOS RAID sets. Ignoring disks %(unusedRaidMems)s.",
- len(unusedRaidMembers)) % {"unusedRaidMems": ", ".join(unusedRaidMembers)},
- custom_icon="warning")
-
- def resetInitializeDiskQuestion(self):
- self._initLabelAnswers = {}
-
- def questionInitializeDisk(self, path, description, size):
-
- retVal = False # The less destructive default
-
- if not path:
- return retVal
-
- # we are caching answers so that we don't
- # ask in each storage.reset() again
- if path in self._initLabelAnswers:
- log.info("UI not asking about disk initialization, "
- "using cached answer: %s" % self._initLabelAnswers[path])
- return self._initLabelAnswers[path]
- elif "all" in self._initLabelAnswers:
- log.info("UI not asking about disk initialization, "
- "using cached answer: %s" % self._initLabelAnswers["all"])
- return self._initLabelAnswers["all"]
-
- rc = self.reinitializeWindow(_("Storage Device Warning"),
- path, size, description)
-
- if rc == 0:
- retVal = False
- elif rc == 1:
- path = "all"
- retVal = False
- elif rc == 2:
- retVal = True
- elif rc == 3:
- path = "all"
- retVal = True
-
- self._initLabelAnswers[path] = retVal
- return retVal
-
- def resetReinitInconsistentLVMQuestion(self):
- self._inconsistentLVMAnswers = {}
-
- def questionReinitInconsistentLVM(self, pv_names=None, lv_name=None, vg_name=None):
-
- retVal = False # The less destructive default
- allSet = frozenset(["all"])
-
- if not pv_names or (lv_name is None and vg_name is None):
- return retVal
-
- # We are caching answers so that we don't ask for ignoring
- # in each storage.reset() again (note that reinitialization is
- # done right after confirmation in dialog, not as a planned
- # action).
- key = frozenset(pv_names)
- if key in self._inconsistentLVMAnswers:
- log.info("UI not asking about disk initialization, "
- "using cached answer: %s" % self._inconsistentLVMAnswers[key])
- return self._inconsistentLVMAnswers[key]
- elif allSet in self._inconsistentLVMAnswers:
- log.info("UI not asking about disk initialization, "
- "using cached answer: %s" % self._inconsistentLVMAnswers[allSet])
- return self._inconsistentLVMAnswers[allSet]
-
- if vg_name is not None:
- message = "Volume Group %s" % vg_name
- elif lv_name is not None:
- message = "Logical Volume %s" % lv_name
-
- na = {'msg': message, 'pvs': ", ".join(pv_names)}
- rc = self.messageWindow(_("Warning"),
- _("Error processing LVM.\n"
- "There is inconsistent LVM data on %(msg)s. You can "
- "reinitialize all related PVs (%(pvs)s) which will erase "
- "the LVM metadata, or ignore which will preserve the "
- "contents. This action may also be applied to all other "
- "PVs with inconsistent metadata.") % na,
- type="custom",
- custom_buttons = [ _("_Ignore"),
- _("Ignore _all"),
- _("_Re-initialize"),
- _("Re-ini_tialize all") ],
- custom_icon="question")
- if rc == 0:
- retVal = False
- elif rc == 1:
- key = allSet
- retVal = False
- elif rc == 2:
- retVal = True
- elif rc == 3:
- key = allSet
- retVal = True
-
- self._inconsistentLVMAnswers[key] = retVal
- return retVal
-
- def questionInitializeDASD(self, c, devs):
- """Ask if unformatted DASD's should be formatted"""
- title = P_("Unformatted DASD Device Found",
- "Unformatted DASD Devices Found", c)
- msg = P_("Format uninitialized DASD device?\n\n"
- "There is %d uninitialized DASD device on this "
- "system. To continue installation, the device must "
- "be formatted. Formatting will remove any data on "
- "this device.",
- "Format uninitialized DASD devices?\n\n"
- "There are %d uninitialized DASD devices on this "
- "system. To continue installation, the devices must "
- "be formatted. Formatting will remove any data on "
- "these devices.", c) % c
- icon = "/usr/share/icons/gnome/32x32/status/dialog-error.png"
- buttons = [_("_Format"), _("_Ignore")]
- return self.detailedMessageWindow(title, msg, devs.strip(),
- type="custom",
- custom_icon=icon,
- custom_buttons=buttons,
- expanded=True)
-
def hardwareError(self, exception):
text=_("The installation was stopped due to what seems to be a problem "
"with your hardware. The exact error message is:\n\n%s.\n\n "
diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py
index b72ba95cd..6fab62d80 100644
--- a/pyanaconda/rescue.py
+++ b/pyanaconda/rescue.py
@@ -107,24 +107,6 @@ class RescueInterface(InstallInterfaceBase):
w.pop()
return passphrase
- def resetInitializeDiskQuestion(self):
- self._initLabelAnswers = {}
-
- def resetReinitInconsistentLVMQuestion(self):
- self._inconsistentLVMAnswers = {}
-
- def questionInitializeDisk(self, path, description, size):
- # Never initialize disks in rescue mode!
- return False
-
- def questionReinitInconsistentLVM(self, pv_names=None, lv_name=None, vg_name=None):
- # Never reinit VG's in rescue mode!
- return False
-
- def questionInitializeDASD(self, c, devs):
- # Special return value to let dasd.py know we're rescue mode
- return 1
-
def shutdown (self):
self.screen.finish()
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 079a3b876..07622a9d7 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -64,14 +64,9 @@ _ = lambda x: gettext.ldgettext("anaconda", x)
import logging
log = logging.getLogger("storage")
-def storageInitialize(anaconda):
- storage = anaconda.storage
-
+def storageInitialize(storage, ksdata, protected):
storage.shutdown()
- if anaconda.dir == DISPATCH_BACK:
- return
-
# touch /dev/.in_sysinit so that /lib/udev/rules.d/65-md-incremental.rules
# does not mess with any mdraid sets
open("/dev/.in_sysinit", "w")
@@ -82,54 +77,34 @@ def storageInitialize(anaconda):
# Before we set up the storage system, we need to know which disks to
# ignore, etc. Luckily that's all in the kickstart data.
- if anaconda.ksdata:
- anaconda.storage.config.zeroMbr = anaconda.ksdata.zerombr.zerombr
- anaconda.storage.config.ignoreDiskInteractive = anaconda.ksdata.ignoredisk.interactive
- anaconda.storage.config.ignoredDisks = anaconda.ksdata.ignoredisk.ignoredisk
- anaconda.storage.config.exclusiveDisks = anaconda.ksdata.ignoredisk.onlyuse
-
- if anaconda.ksdata.clearpart.type is not None:
- anaconda.storage.config.clearPartType = anaconda.ksdata.clearpart.type
- anaconda.storage.config.clearPartDisks = anaconda.ksdata.clearpart.drives
- if anaconda.ksdata.clearpart.initAll:
- anaconda.storage.config.reinitializeDisks = anaconda.ksdata.clearpart.initAll
-
- anaconda.intf.resetInitializeDiskQuestion()
- anaconda.intf.resetReinitInconsistentLVMQuestion()
+ storage.config.zeroMbr = ksdata.zerombr.zerombr
+ storage.config.ignoreDiskInteractive = ksdata.ignoredisk.interactive
+ storage.config.ignoredDisks = ksdata.ignoredisk.ignoredisk
+ storage.config.exclusiveDisks = ksdata.ignoredisk.onlyuse
+
+ if ksdata.clearpart.type is not None:
+ storage.config.clearPartType = ksdata.clearpart.type
+ storage.config.clearPartDisks = ksdata.clearpart.drives
+ if ksdata.clearpart.initAll:
+ storage.config.reinitializeDisks = ksdata.clearpart.initAll
+
lvm.lvm_vg_blacklist = []
# Set up the protected partitions list now.
- if anaconda.protected:
- storage.config.protectedDevSpecs.extend(anaconda.protected)
+ if protected:
+ storage.config.protectedDevSpecs.extend(protected)
storage.reset()
if not flags.livecdInstall and not storage.protectedDevices:
if anaconda.upgrade:
return
else:
- anaconda.intf.messageWindow(_("Unknown Device"),
- _("The installation source given by device %s "
- "could not be found. Please check your "
- "parameters and try again.") % anaconda.protected,
- type="custom", custom_buttons = [_("_Exit installer")])
- sys.exit(1)
+ raise UnknownSourceDeviceError(protected)
else:
storage.reset()
if not storage.disks:
- custom_buttons=[_("_Try again"), _("_Exit installer")]
- if anaconda.dispatch.can_go_back():
- custom_buttons = [_("_Back"), _("_Exit installer")]
- rc = anaconda.intf.messageWindow(_("No disks found"),
- _("No usable disks have been found."),
- type="custom",
- custom_buttons=custom_buttons, default=0)
- if rc == 0:
- if anaconda.dispatch.can_go_back():
- return DISPATCH_BACK
- else:
- return storageInitialize(anaconda)
- sys.exit(1)
+ raise NoDisksError
# dispatch.py helper function
def storageComplete(anaconda):
@@ -377,8 +352,7 @@ class Storage(object):
self._dumpFile = "/tmp/storage.state"
# these will both be empty until our reset method gets called
- self.devicetree = DeviceTree(intf=self.intf,
- conf=self.config,
+ self.devicetree = DeviceTree(conf=self.config,
passphrase=self.encryptionPassphrase,
luksDict=self.__luksDevs,
iscsi=self.iscsi,
@@ -455,30 +429,23 @@ class Storage(object):
if device.format.type == "luks" and device.format.exists:
self.__luksDevs[device.format.uuid] = device.format._LUKS__passphrase
- prog = None
- if self.intf:
- prog = self.intf.progressWindow(_("Examining Devices"),
- _("Examining storage devices"),
- 100, 0.03, pulse=True)
if not flags.imageInstall:
- self.iscsi.startup(self.intf)
- self.fcoe.startup(self.intf)
- self.zfcp.startup(self.intf)
- self.dasd.startup(self.intf,
+ self.iscsi.startup()
+ self.fcoe.startup()
+ self.zfcp.startup()
+ self.dasd.startup(None,
self.config.exclusiveDisks,
self.config.zeroMbr)
clearPartType = self.config.clearPartType # save this before overriding it
if getattr(self.anaconda, "upgrade", False):
self.config.clearPartType = CLEARPART_TYPE_NONE
- self.devicetree = DeviceTree(intf=self.intf,
- conf=self.config,
+ self.devicetree = DeviceTree(conf=self.config,
passphrase=self.encryptionPassphrase,
luksDict=self.__luksDevs,
iscsi=self.iscsi,
dasd=self.dasd)
- self.devicetree.populate(progressWindow=prog,
- cleanupOnly=cleanupOnly)
+ self.devicetree.populate(cleanupOnly=cleanupOnly)
self.config.clearPartType = clearPartType # set it back
self.fsset = FSSet(self.devicetree)
self.eddDict = get_edd_dict(self.partitioned)
@@ -494,8 +461,6 @@ class Storage(object):
self.anaconda.bootloader.stage1_device = None
self.dumpState("initial")
- if prog:
- prog.pop()
@property
def devices(self):
diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 7b411e6eb..19db08477 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -152,7 +152,7 @@ class DeviceTree(object):
except for resize actions.
"""
- def __init__(self, intf=None, conf=None, passphrase=None, luksDict=None,
+ def __init__(self, conf=None, passphrase=None, luksDict=None,
iscsi=None, dasd=None):
# internal data members
self._devices = []
@@ -161,7 +161,6 @@ class DeviceTree(object):
# indicates whether or not the tree has been fully populated
self.populated = False
- self.intf = intf
self.exclusiveDisks = getattr(conf, "exclusiveDisks", [])
self.clearPartType = getattr(conf, "clearPartType", CLEARPART_TYPE_NONE)
self.clearPartDisks = getattr(conf, "clearPartDisks", [])
@@ -313,12 +312,12 @@ class DeviceTree(object):
log.info("executing action: %s" % action)
if not dryRun:
try:
- action.execute(intf=self.intf)
+ action.execute()
except DiskLabelCommitError:
# it's likely that a previous format destroy action
# triggered setup of an lvm or md device.
self.teardownAll()
- action.execute(intf=self.intf)
+ action.execute()
udev_settle()
for device in self._devices:
@@ -1125,25 +1124,6 @@ class DeviceTree(object):
else:
initlabel = False
-
- if self._cleanup:
- initcb = lambda: False
- elif self.zeroMbr:
- initcb = lambda: True
- elif not self.intf:
- initcb = lambda: False
- else:
- description = device.description or device.model
- try:
- bypath = os.path.basename(deviceNameToDiskByPath(device.name))
- except DeviceNotFoundError:
- # some devices don't have a /dev/disk/by-path/ #!@#@!@#
- bypath = device.name
-
- initcb = lambda: self.intf.questionInitializeDisk(bypath,
- description,
- device.size)
-
# we're going to pass the "best" disklabel type into the DiskLabel
# constructor, but it only has meaning for non-existent disklabels.
labelType = self.platform.bestDiskLabelType(device)
@@ -1157,16 +1137,8 @@ class DeviceTree(object):
labelType=labelType,
exists=not initlabel)
except InvalidDiskLabelError:
- # if we have a cb function use it. else we ignore the device.
- if initcb is not None and initcb():
- format = getFormat("disklabel",
- device=device.path,
- labelType=labelType,
- exists=False)
- else:
- self._removeDevice(device)
- self.addIgnoredDisk(device.name)
- return
+ self.addIgnoredDisk(device.name)
+ return
if not format.exists:
# if we just initialized a disklabel we should schedule
@@ -1210,7 +1182,7 @@ class DeviceTree(object):
# this makes device.configured return True
device.format.passphrase = 'yabbadabbadoo'
else:
- passphrase = getLUKSPassphrase(self.intf,
+ passphrase = getLUKSPassphrase(None,
device,
self.__passphrases)
if passphrase and passphrase not in self.__passphrases:
@@ -1663,75 +1635,21 @@ class DeviceTree(object):
log.info("got format: %s" % device.format)
def _handleInconsistencies(self):
- def reinitializeVG(vg):
- # First we remove VG data
- try:
- vg.destroy()
- except DeviceError:
- # the pvremoves will finish the job.
- log.warning("There was an error destroying the VG %s." % vg.name)
-
- # remove VG device from list.
- self._removeDevice(vg)
-
- for parent in vg.parents:
- parent.format.destroy()
-
- # Give the vg the a default format
- kwargs = {"device": parent.path,
- "exists": parent.exists}
- parent.format = formats.getFormat(*[""], **kwargs)
-
def leafInconsistencies(device):
- if device.type == "lvmvg":
- if device.complete:
- return
-
- paths = []
- for parent in device.parents:
- paths.append(parent.path)
-
- # if zeroMbr is true don't ask.
- if not self._cleanup and \
- (self.zeroMbr or
- (self.intf and
- self.intf.questionReinitInconsistentLVM(pv_names=paths,
- vg_name=device.name))):
- reinitializeVG(device)
+ devicelibs.lvm.lvm_cc_addFilterRejectRegexp(device.name)
+ devicelibs.lvm.blacklistVG(device.name)
+ for parent in device.parents:
+ if parent.type == "partition":
+ parent.format.inconsistentVG = True
+ parent.protected = True
else:
- # The user chose not to reinitialize.
- # hopefully this will ignore the vg components too.
- self._removeDevice(device)
- devicelibs.lvm.lvm_cc_addFilterRejectRegexp(device.name)
- devicelibs.lvm.blacklistVG(device.name)
- for parent in device.parents:
- if parent.type == "partition":
- parent.format.inconsistentVG = True
- parent.protected = True
- else:
- self._removeDevice(parent, moddisk=False)
- self.addIgnoredDisk(parent.name)
- devicelibs.lvm.lvm_cc_addFilterRejectRegexp(parent.name)
+ self.addIgnoredDisk(parent.name)
+ devicelibs.lvm.lvm_cc_addFilterRejectRegexp(parent.name)
# Address the inconsistencies present in the tree leaves.
- for leaf in self.leaves:
+ for leaf in filter(lambda leaf: leaf.type == "lvmvg" and not leaf.complete, self.leaves):
leafInconsistencies(leaf)
- # Check for unused BIOS raid members, unused dmraid members are added
- # to self.unusedRaidMembers as they are processed, extend this list
- # with unused mdraid BIOS raid members
- for c in self.getDevicesByType("mdcontainer"):
- if c.kids == 0:
- self.unusedRaidMembers.extend(map(lambda m: m.name, c.devices))
-
- if self.unusedRaidMembers and not self._cleanup and self.intf:
- self.intf.unusedRaidMembersWarning(self.unusedRaidMembers)
-
- # remove md array devices for which we did not find all members
- for array in self.getDevicesByType("mdarray"):
- if array.memberDevices > len(array.parents):
- self._recursiveRemove(array)
-
def _recursiveRemove(self, device):
for d in self.getChildren(device):
self._recursiveRemove(d)
@@ -1827,20 +1745,20 @@ class DeviceTree(object):
def restoreConfigs(self):
self.backupConfigs(restore=True)
- def populate(self, cleanupOnly=False, progressWindow=None):
+ def populate(self, cleanupOnly=False):
""" Locate all storage devices. """
self.backupConfigs()
if cleanupOnly:
self._cleanup = True
try:
- self._populate(progressWindow)
+ self._populate()
except Exception:
raise
finally:
self.restoreConfigs()
- def _populate(self, progressWindow):
+ def _populate(self):
log.info("DeviceTree.populate: ignoredDisks is %s ; exclusiveDisks is %s"
% (self._ignoredDisks, self.exclusiveDisks))
@@ -1878,8 +1796,6 @@ class DeviceTree(object):
for dev in self.topology.devices_iter():
old_devices[dev['name']] = dev
self.addUdevDevice(dev)
- if progressWindow:
- progressWindow.pulse()
# Having found all the disks, we can now find all the multipaths built
# upon them.
@@ -1901,8 +1817,6 @@ class DeviceTree(object):
self.__multipathConfigWriter.addMultipathDevice(mp)
self._addDevice(mp)
self.addUdevDevice(mp_info)
- if progressWindow:
- progressWindow.pulse()
for d in self.devices:
if not d.name in whitelist:
self.__multipathConfigWriter.addBlacklistDevice(d)
@@ -1939,8 +1853,6 @@ class DeviceTree(object):
log.info("devices to scan: %s" % [d['name'] for d in devices])
for dev in devices:
self.addUdevDevice(dev)
- if progressWindow:
- progressWindow.pulse()
self.populated = True
diff --git a/pyanaconda/storage/errors.py b/pyanaconda/storage/errors.py
index 6c2ed2ed3..22178732a 100644
--- a/pyanaconda/storage/errors.py
+++ b/pyanaconda/storage/errors.py
@@ -175,3 +175,10 @@ class SizeNotPositiveError(StorageError):
class SizePlacesError(StorageError):
pass
+
+# probing
+class UnknownSourceDeviceError(StorageError):
+ pass
+
+class NoDisksError(StorageError):
+ pass
diff --git a/pyanaconda/storage/fcoe.py b/pyanaconda/storage/fcoe.py
index 7280e5669..c8497de4e 100644
--- a/pyanaconda/storage/fcoe.py
+++ b/pyanaconda/storage/fcoe.py
@@ -66,19 +66,13 @@ class fcoe(object):
def __call__(self):
return self
- def _stabilize(self, intf = None):
- if intf:
- w = intf.waitWindow(_("Connecting to FCoE SAN"),
- _("Connecting to FCoE SAN"))
-
+ def _stabilize(self):
# I have no clue how long we need to wait, this ought to do the trick
time.sleep(10)
iutil.execWithRedirect("udevadm", [ "settle" ],
stdout = "/dev/tty5", stderr="/dev/tty5")
- if intf:
- w.pop()
- def _startEDD(self, intf = None):
+ def _startEDD(self):
rc = iutil.execWithCapture("/usr/libexec/fcoe/fcoe_edd.sh", [ "-i" ],
stderr="/dev/tty5")
if not rc.startswith("NIC="):
@@ -91,16 +85,16 @@ class fcoe(object):
return
log.info("FCoE NIC found in EDD: %s" % val)
- self.addSan(val, dcb=True, intf=intf)
+ self.addSan(val, dcb=True)
- def startup(self, intf = None):
+ def startup(self):
if self.started:
return
if not has_fcoe():
return
- self._startEDD(intf)
+ self._startEDD()
self.started = True
def _startLldpad(self):
@@ -111,7 +105,7 @@ class fcoe(object):
stdout = "/dev/tty5", stderr="/dev/tty5")
self.lldpadStarted = True
- def addSan(self, nic, dcb=False, intf=None):
+ def addSan(self, nic, dcb=False):
if not has_fcoe():
raise IOError, _("FCoE not available")
@@ -144,7 +138,7 @@ class fcoe(object):
f.write(nic)
f.close()
- self._stabilize(intf)
+ self._stabilize()
self.nics.append((nic, dcb))
def writeKS(self, f):
diff --git a/pyanaconda/storage/iscsi.py b/pyanaconda/storage/iscsi.py
index 01c6187b0..9c086e4d3 100644
--- a/pyanaconda/storage/iscsi.py
+++ b/pyanaconda/storage/iscsi.py
@@ -124,7 +124,7 @@ class iscsi(object):
initiator = property(_getInitiator, _setInitiator)
- def _startIBFT(self, intf = None):
+ def _startIBFT(self):
if not flags.ibft:
return
@@ -145,21 +145,17 @@ class iscsi(object):
(node.name, str(e)))
pass
- self.stabilize(intf)
+ self.stabilize()
- def stabilize(self, intf = None):
+ def stabilize(self):
# Wait for udev to create the devices for the just added disks
- if intf:
- w = intf.waitWindow(_("Scanning iSCSI nodes"),
- _("Scanning iSCSI nodes"))
+
# 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)
udev_settle()
- if intf:
- w.pop()
- def startup(self, intf = None):
+ def startup(self):
if self.started:
return
@@ -170,10 +166,6 @@ class iscsi(object):
log.info("no initiator set")
return
- if intf:
- w = intf.waitWindow(_("Initializing iSCSI initiator"),
- _("Initializing iSCSI initiator"))
-
log.debug("Setting up %s" % (INITIATOR_FILE, ))
log.info("iSCSI initiator name %s", self.initiator)
if os.path.exists(INITIATOR_FILE):
@@ -209,10 +201,7 @@ class iscsi(object):
stdout="/dev/tty5", stderr="/dev/tty5")
time.sleep(1)
- if intf:
- w.pop()
-
- self._startIBFT(intf)
+ self._startIBFT()
self.started = True
def discover(self, ipaddr, port="3260", username=None, password=None,
@@ -237,7 +226,7 @@ class iscsi(object):
password=password,
reverse_username=r_username,
reverse_password=r_password)
- self.startup(intf)
+ self.startup()
# Note may raise an IOError
found_nodes = libiscsi.discover_sendtargets(address=ipaddr,
diff --git a/pyanaconda/storage/zfcp.py b/pyanaconda/storage/zfcp.py
index f90d04ac0..e74c1e10e 100644
--- a/pyanaconda/storage/zfcp.py
+++ b/pyanaconda/storage/zfcp.py
@@ -393,8 +393,7 @@ class ZFCP:
except ValueError as e:
log.warn(str(e))
- def startup(self, intf=None):
- self.intf = intf
+ def startup(self):
if not self.down:
return
self.down = False