Skip to content

Commit

Permalink
Change allow_degraded_mdraid flag to allow_imperfect_devices (#1202877)
Browse files Browse the repository at this point in the history
Related: rhbz#1090009
Related: rhbz#1202877

(cherry picked from commit 0eb434b)

The only change is a name change. The plan is to use this flag for situations
where it is better to use the imperfect device then to deactivate or remove it
or otherwise get it out of sight.

Generally, when installing, imperfect devices are best avoided, because
you don't really want to install onto them. But when in installer rescue
mode and many other situations, it is better to expose an imperfect but
still usable device.

Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Jun 2, 2015
1 parent 0a8c529 commit d066845
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions blivet/devicetree.py
Expand Up @@ -873,15 +873,15 @@ def addUdevMDDevice(self, info):
return

# try to get the device again now that we've got all the slaves
device = self.getDeviceByName(name, incomplete=flags.allow_degraded_mdraid)
device = self.getDeviceByName(name, incomplete=flags.allow_imperfect_devices)

if device is None:
try:
uuid = udev.device_get_md_uuid(info)
except KeyError:
log.warning("failed to obtain uuid for mdraid device")
else:
device = self.getDeviceByUuid(uuid, incomplete=flags.allow_degraded_mdraid)
device = self.getDeviceByUuid(uuid, incomplete=flags.allow_imperfect_devices)

# if we get here, we found all of the slave devices and
# something must be wrong -- if all of the slaves are in
Expand Down Expand Up @@ -1150,7 +1150,7 @@ def addUdevDevice(self, info):
if device is None and udev.device_is_md(info):
device = self.getDeviceByName(
udev.device_get_md_name(info),
incomplete=flags.allow_degraded_mdraid)
incomplete=flags.allow_imperfect_devices)
if device and not isinstance(device, MDRaidArrayDevice):
# make sure any device we found is an md device
device = None
Expand Down
4 changes: 2 additions & 2 deletions blivet/flags.py
Expand Up @@ -63,7 +63,7 @@ def __init__(self):
self.boot_cmdline = {}

self.update_from_boot_cmdline()
self.allow_degraded_mdraid = True
self.allow_imperfect_devices = True

def get_boot_cmdline(self):
buf = open("/proc/cmdline").read().strip()
Expand Down Expand Up @@ -101,7 +101,7 @@ def update_from_anaconda_flags(self, anaconda_flags):
self.gpt = anaconda_flags.gpt

self.multipath_friendly_names = anaconda_flags.mpathFriendlyNames
self.allow_degraded_mdraid = anaconda_flags.rescue_mode
self.allow_imperfect_devices = anaconda_flags.rescue_mode

self.ibft = anaconda_flags.ibft
self.dmraid = anaconda_flags.dmraid
Expand Down

0 comments on commit d066845

Please sign in to comment.