58 lines
2.3 KiB
Diff
58 lines
2.3 KiB
Diff
From 5ff2c303eee42b38db75e538c196741d0e9e29d6 Mon Sep 17 00:00:00 2001
|
|
From: Vendula Poncova <vponcova@redhat.com>
|
|
Date: Tue, 11 Feb 2020 11:33:08 +0100
|
|
Subject: [PATCH] Don't use the local storage object
|
|
|
|
If the local storage object is not available, don't set it up. It means that
|
|
Anaconda uses the DBus Storage module and it is enough to set up the extra
|
|
arguments of the Bootloader module.
|
|
---
|
|
com_redhat_kdump/ks/kdump.py | 16 ++++++++++++++--
|
|
1 file changed, 14 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/com_redhat_kdump/ks/kdump.py b/com_redhat_kdump/ks/kdump.py
|
|
index 09f727b..167edba 100644
|
|
--- a/com_redhat_kdump/ks/kdump.py
|
|
+++ b/com_redhat_kdump/ks/kdump.py
|
|
@@ -70,7 +70,11 @@ def setup(self, storage, ksdata, payload):
|
|
if not kernel_arguments.is_enabled("kdump_addon"):
|
|
return
|
|
|
|
+ # Update the package list.
|
|
+ if self.enabled:
|
|
+ ksdata.packages.packageList.append("kexec-tools")
|
|
|
|
+ # Update the bootloader arguments.
|
|
bootloader_proxy = STORAGE.get_proxy(BOOTLOADER)
|
|
|
|
# Clear any existing crashkernel bootloader arguments
|
|
@@ -83,10 +87,18 @@ def setup(self, storage, ksdata, payload):
|
|
# Ensure that the amount is an amount in MB
|
|
if self.reserveMB[-1] != 'M':
|
|
self.reserveMB += 'M'
|
|
- new_args.append(' crashkernel=%s' % self.reserveMB)
|
|
+ new_args.append('crashkernel=%s' % self.reserveMB)
|
|
+
|
|
+ if self.enablefadump and os.path.exists(FADUMP_CAPABLE_FILE):
|
|
+ new_args.append('fadump=on')
|
|
|
|
bootloader_proxy.SetExtraArguments(new_args)
|
|
|
|
+ # If the local storage object is not available, skip.
|
|
+ # FIXME: This is a temporary workaround.
|
|
+ if not storage:
|
|
+ return
|
|
+
|
|
# Do the same thing with the storage.bootloader.boot_args set
|
|
if storage.bootloader.boot_args:
|
|
crashargs = [arg for arg in storage.bootloader.boot_args \
|
|
@@ -95,7 +107,7 @@ def setup(self, storage, ksdata, payload):
|
|
|
|
if self.enabled:
|
|
storage.bootloader.boot_args.add('crashkernel=%s' % self.reserveMB)
|
|
- ksdata.packages.packageList.append("kexec-tools")
|
|
+
|
|
if self.enablefadump and os.path.exists(FADUMP_CAPABLE_FILE):
|
|
storage.bootloader.boot_args.add('fadump=on')
|
|
|