This resolves 1928031.
Currently we have a hard dependency on dracut-network, which is not
needed when network target is not used.
There have been multiple users complaining about kexec-tools slows first
kernel boot due to unconditionally pulls in dracut-network, and dracut
will install network manager into first initrd if this package is
present.
This series fixes the module dependency declaration so if kdump is
using a network target, and dracut-network is not installed, kdumpctl
service sill fail with:
dracut: dracut module 'kdumpbase' depends on 'nfs', which can't be
installed
Or:
dracut: dracut module 'kdumpbase' depends on 'network', which can't be
installed
Which indicates the dracut-network is missing and need to be installed.
Then dropped the dracut-network requirement in Fedora, so it won't get
pulled in for default installation.
Kairui Song (2):
dracut-module-setup.sh: depend on the right modules for different
targets
Drop requirement of dracut-network
dracut-module-setup.sh | 15 ++++++++++++++-
kexec-tools.spec | 3 +--
2 files changed, 15 insertions(+), 3 deletions(-)
--
2.31.1
Show replies by date
Currently we are depending on dracut to include needed modules
automatically according to --mount or --device params.
But this may cause kdump to fail silently if any module is
not installed due to module missing, binary missing or any other similar
issues.
Dracut will do best-effort try to include all modules for hostonly
devices, but it won't fail unless a module is depended by any mandatory
module.
So declare the dependency explicitly.
Signed-off-by: Kairui Song <kasong(a)redhat.com>
---
dracut-module-setup.sh | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index a5e4b678..0b78ed77 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -40,6 +40,18 @@ depends() {
_dep="$_dep ssh-client"
fi
+ if is_nfs_dump_target; then
+ _dep="$_dep nfs"
+ fi
+
+ if for_each_host_dev_and_slaves block_is_iscsi; then
+ _dep="$_dep iscsi"
+ fi
+
+ if for_each_host_dev_and_slaves block_is_fcoe; then
+ _dep="$_dep fcoe"
+ fi
+
if [[ "$(uname -m)" == "s390x" ]]; then
_dep="$_dep znet"
fi
@@ -48,7 +60,8 @@ depends() {
add_opt_module drm
fi
- if is_generic_fence_kdump || is_pcs_fence_kdump; then
+ if is_generic_fence_kdump || is_pcs_fence_kdump || \
+ for_each_host_dev_and_slaves_all block_is_netdevice; then
_dep="$_dep network"
fi
--
2.31.1
If kdump is not using a network target, dracut-network is not needed.
If kdump is using a network target, and dracut-network is not installed,
kdumpctl service sill simply fail with:
dracut: dracut module 'kdumpbase' depends on 'nfs', which can't be
installed
dracut: dracut module 'kdumpbase' cannot be found or installed.
Which indicates the dracut-network is missing and need to be installed.
Signed-off-by: Kairui Song <kasong(a)redhat.com>
---
kexec-tools.spec | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kexec-tools.spec b/kexec-tools.spec
index 5dbf6255..0db5b7d2 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -66,8 +66,7 @@ Requires(post): servicelog
%endif
Requires(pre): coreutils sed zlib
Requires: dracut >= 050
-Requires: dracut-network >= 050
-Requires: dracut-squash >= 050
+Requires: dracut-squash
Requires: ethtool
Recommends: grubby
BuildRequires: make
--
2.31.1