[blivet][rhel7-branch] workaround for system startup bug
by David Lehman
This is a workaround to allow installation to a single path of a
multipath in the event that multipathd loses the race to claim
the member disks during system startup. This patch does nothing
to make the resulting system use multipath, so it is on the user
to manually reconfigure their system after installation.
I don't really want this on master since this should be fixed
outside of blivet/anaconda. If anyone disagrees, let me know.
10 years, 2 months
[master/rhel7] Fix 'text' and 'skipx' (#1021963)
by Will Woods
Right now, if you boot the installer with 'text' and install a package set
that includes Xorg and a desktop, you'll get a system that boots to graphical
mode.
The intended behavior is this: if the installer is in text mode, the installed
system should also come up in text mode.
Alternately, if the user specifies 'skipx' in the kickstart, we should boot to
text mode, not graphical.
So here's three patches to fix that up a bit:
Patch 1: If you have 'skipx' in kickstart, change the default target to
multi-user.target.
Patch 2: If (after setupDisplay has a chance to ask questions etc.) the
installer is running in text mode, set skipx to True.
Patch 3: Make sure we write 'text' or 'cmdline' into the resulting kickstart
if the installer is in text or cmdline mode.
I've tested these with RHEL7, and they seem to work as expected.
-w
10 years, 2 months
[master/rhel7-branch] Force reboot the system on cmdline error. (#1034773)
by Samantha N. Bueno
A system would not reboot under all cases where a CmdlineError was
raised, so just force it this way.
Resolves: rhbz#1034773
---
pyanaconda/exception.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 13f5ba9..c7ab659 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -107,7 +107,7 @@ class AnacondaExceptionHandler(ExceptionHandler):
# for a few seconds before exiting the installer
print(cmdline_error_msg)
time.sleep(180)
- sys.exit(0)
+ os.system("reboot")
else:
try:
# pylint: disable-msg=E0611
--
1.8.3.1
10 years, 2 months
[blvet:rhel7/master 0/8] Fix problems with what accordion displays (v3)
by Anne Mulhern
David Lehman (1):
Find more used devices when calculating unused devices (#1043763)
mulhern (7):
Factor hiding a single device into a separate method (#1043763)
Factor canceling actions into a separate method (#1043763)
Calculate all actions to remove before removing (#1043763)
Make the hide method itself unrecursive (#1043763)
Remove all lvs and pvs belonging to a vg (#1043763)
Make empty_device an instance method of DeviceTree (#1043763)
Cancel actions on empty devices (#1043763)
blivet/__init__.py | 21 +++--------
blivet/devicetree.py | 105 ++++++++++++++++++++++++++++++++++++---------------
2 files changed, 80 insertions(+), 46 deletions(-)
--
1.8.3.1
10 years, 2 months
[RHEL-7 patch] Make rhcrashkernel-param get run on non-GRUB 2 platforms.
by Peter Jones
Previously we were only running this on GRUB 2 platforms, and we need to
be doing it the same way everywhere.
Resolves: rhbz#814813
Signed-off-by: Peter Jones <pjones(a)redhat.com>
---
pyanaconda/bootloader.py | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index c313b6a..8cee09e 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -932,11 +932,25 @@ class BootLoader(object):
except OSError as e:
log.error("failed to set config file permissions: %s" % e)
+ def add_crash_args(self):
+ buf = ""
+ if os.access("%s%s" % (ROOT_PATH, "/usr/sbin/rhcrashkernel-param"), \
+ os.X_OK):
+ (pread, pwrite) = os.pipe()
+ os.close(pwrite)
+ buf = iutil.execWithCapture("/usr/sbin/rhcrashkernel-param", [],
+ stdin=pread,
+ root=ROOT_PATH)
+ os.close(pread)
+ self.boot_args.add(buf)
+
def write_config(self):
""" Write the bootloader configuration. """
if not self.config_file:
raise BootLoaderError("no config file defined for this bootloader")
+ self.add_crash_args()
+
config_path = os.path.normpath(ROOT_PATH + self.config_file)
if os.access(config_path, os.R_OK):
os.rename(config_path, config_path + ".anacbak")
@@ -1396,8 +1410,6 @@ class GRUB2(GRUB):
def __init__(self):
super(GRUB2, self).__init__()
- self.boot_args.add("$([ -x /usr/sbin/rhcrashkernel-param ] && "\
- "/usr/sbin/rhcrashkernel-param || :)")
# XXX we probably need special handling for raid stage1 w/ gpt disklabel
# since it's unlikely there'll be a bios boot partition on each disk
@@ -1523,6 +1535,8 @@ class GRUB2(GRUB):
os.chmod(users_file, 0700)
def write_config(self):
+ self.add_crash_args()
+
self.write_config_console(None)
# See if we have a password and if so update the boot args before we
# write out the defaults file.
@@ -2094,6 +2108,7 @@ class ZIPL(BootLoader):
"default": self.image_label(self.default)})
config.write(header)
+
#
# installation
#
--
1.8.5.3
10 years, 2 months
[master/rhel7] driverdisk: Catch blkid failure (#1036765)
by Brian C. Lane
Reportedly blkid will somtimes return a 2, catch the error and exit the
iso selection.
Related: rhbz#1036765
---
dracut/driver-updates | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dracut/driver-updates b/dracut/driver-updates
index 47b845e..a744896 100755
--- a/dracut/driver-updates
+++ b/dracut/driver-updates
@@ -647,7 +647,11 @@ def select_iso():
or (None, None) if no ISO file is selected
:rtype: (str, str)
"""
- _ret, out = run_cmd(["blkid"])
+ try:
+ _ret, out = run_cmd(["blkid"])
+ except (OSError, RunCmdError):
+ return (None, None)
+
devices = []
for line in out.splitlines():
dev = parse_blkid(line)
--
1.8.5.3
10 years, 2 months
[master/rhel7] driverdisk: Ignore extra blkid fields (#1036765)
by Brian C. Lane
blkid output may include fields that we are not interested in. This
makes DeviceInfo accept them but only use the ones we are interested in.
Resolves: rhbz#1036765
---
dracut/driver-updates | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dracut/driver-updates b/dracut/driver-updates
index ea73981..47b845e 100755
--- a/dracut/driver-updates
+++ b/dracut/driver-updates
@@ -601,11 +601,11 @@ def network_driver(dd_path):
dd_scan(skip_dds, False)
class DeviceInfo(object):
- def __init__(self, device=None, label=None, uuid=None, fs_type=None):
- self.device = device
- self.label = label
- self.uuid = uuid
- self.fs_type = fs_type
+ def __init__(self, **kwargs):
+ self.device = kwargs.get("device", None)
+ self.label = kwargs.get("label", None)
+ self.uuid = kwargs.get("uuid", None)
+ self.fs_type = kwargs.get("fs_type", None)
def __str__(self):
return "%-10s %-20s %-15s %s" % (self.device or "", self.fs_type or "",
--
1.8.5.3
10 years, 2 months
[anaconda:rhel7/master] Remove redundant _setCurrentFreeSpace() call (#1043763)
by Anne Mulhern
Related: rhbz#1043763
_setCurrentFreeSpace() is called in _updateSpaceDisplay() which is invoked on
the next line.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 61506fc..76185f4 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -869,8 +869,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.passphrase = self.data.autopart.passphrase
self._reset_storage()
self._do_refresh()
- # update our free space number based on Storage
- self._setCurrentFreeSpace()
self._updateSpaceDisplay()
self._applyButton.set_sensitive(False)
--
1.8.3.1
10 years, 2 months
[master/rhel7] clean up anaconda-generator, fix inst.noshell (#1058607)
by Will Woods
Here's two patches to simplify anaconda-generator, and fix inst.noshell.
Both patches move the commandline checking stuff out of anaconda-generator and
into the systemd unit files themselves. This should make the behavior easier
for other people to understand (and control).
The first patch fixes inst.noshell by disabling tmux when inst.noshell or
noshell is present, since it lets you create new shells. See commit ad34bcdc
for the other half of the inst.noshell fix.
The second patch just moves the anaconda-sshd console logic out of
anaconda-generator and into the unit files. No behavior changes are expected
there.
I've tested to confirm that everything works as expected: tmux and tty2 show
up normally, inst.noshell suppresses both, and inst.sshd starts sshd.
-w
10 years, 2 months
[blivet:rhel7/master 0/2] Fix problems with what accordion displays (v4)
by Anne Mulhern
Find more used...is just like before.
Lots of work...this function was removing the wrong devices and
actions in the wrong order using the wrong methods. Since it was mostly
wrong I had to change most of it, so there is little point in separating the
changes into distinct patches. You're better off just looking at the result
of applying the single patch.
David Lehman (1):
Find more used devices when calculating unused devices (#1043763)
mulhern (1):
Lots of work on DeviceTree.hide (#1043763)
blivet/__init__.py | 6 +++--
blivet/devicetree.py | 76 ++++++++++++++++++++++++++++++++++++----------------
2 files changed, 57 insertions(+), 25 deletions(-)
--
1.8.3.1
10 years, 2 months