kdump's dump_to_rootfs will try to start initqueue unconditionally.
dump_to_rootfs will run after systemd isolate to emergency
target, so this is currently accetable.
But there is a problem when initqueue starts the emergency action
because of initqueue timeout. dump_to_rootfs will start initqueue and
lead to timeout again.
So following patch will remove the previous isolation wrapper, and
detect the service status here. Previous isolation makes the detection
impossible. Now this detection will be valid and helpful to prevent
double timeout or hang.
Signed-off-by: Kairui Song <kasong(a)redhat.com>
---
kdump-lib-initramfs.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index 5cb0223..482839a 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -218,8 +218,11 @@ save_opalcore_fs() {
dump_to_rootfs()
{
- dinfo "Trying to bring up rootfs device"
- systemctl start dracut-initqueue
+ if [[ $(systemctl status dracut-initqueue | sed -n "s/^\s*Active:
\(\S*\)\s.*$/\1/p") == "inactive" ]]; then
+ dinfo "Trying to bring up initqueue for rootfs mount"
+ systemctl start dracut-initqueue
+ fi
+
dinfo "Waiting for rootfs mount, will timeout after 90 seconds"
systemctl start sysroot.mount
--
2.30.2