[kexec-tools] Relax restriction of dumping on encrypted target

WANG Chao wangchao at fedoraproject.org
Mon Mar 3 05:52:58 UTC 2014


commit 906dc0bca0c7056cd2cc4d9bed9a9b304af6d0a9
Author: arthur <zzou at redhat.com>
Date:   Wed Feb 19 10:02:19 2014 +0800

    Relax restriction of dumping on encrypted target
    
    Description:
    Currently kdumpctl will fail to create kdump initramfs and start
    kdump service while dump target is encrypted. This restriction is
    too strict.
    
    Resolution:
    Just warn user that encrypted device is in dump path and second
    kernel will wait on console for password to be entered.
    
    Signed-off-by: arthur <zzou at redhat.com>
    Acked-by: Vivek Goyal <vgoyal at redhat.com>

 mkdumprd |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/mkdumprd b/mkdumprd
index bc002bc..6797791 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -467,7 +467,7 @@ is_crypt()
     eval "$line"
     [[ "$ID_FS_TYPE" = "crypto_LUKS" ]] && {
         dev=$(udevadm info --query=all --path=/sys/dev/block/$majmin | awk -F= '/DEVNAME/{print $2}')
-        perror "Device $dev is encrypted, can not be used in kdump."
+        echo "Device $dev is encrypted."
         return 0
     }
     return 1
@@ -482,18 +482,11 @@ check_crypt()
 
     [ $_ret -eq 0 ] && return
 
-    if [ $_ret -eq 1 ]; then
-        _target=$(get_block_dump_target)
-        perror "Can not save vmcore to target device $_target."
-    elif [ $_ret -eq 2 ]; then
-        perror "Default action is dump_to_rootfs but can not save vmcore to root device."
-    fi
-
     return 1
 }
 
 if ! check_crypt; then
-    exit 1
+    echo "Warning: Encrypted device is in dump path. User will prompted for password during second kernel boot." 
 fi
 
 # firstly get right SSH_KEY_LOCATION


More information about the scm-commits mailing list