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