From: Kenneth D'souza kdsouza@redhat.com
Currently the kdumpctl script doesn't check if the path option is set more than once due to which a vmcore is not captured.
This patch addresses this issue by ensuring that only one path is specified in /etc/kdump.conf file.
Signed-off-by: Kenneth D'souza kdsouza@redhat.com --- kdumpctl | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 6a01c13..e07ec06 100755 --- a/kdumpctl +++ b/kdumpctl @@ -204,6 +204,13 @@ check_config() return 1 }
+ # Check if path option is set more than once. + nr=$(awk 'BEGIN{cnt=0} /^path /{cnt++} END{print cnt}' $KDUMP_CONFIG_FILE) + [ $nr -gt 1 ] && { + echo "Mutiple paths specifed in $KDUMP_CONFIG_FILE" + return 1 + } + nr=$(grep "^dracut_args .*--mount" $KDUMP_CONFIG_FILE | grep -o "--mount" | wc -l) [ $nr -gt 1 ] && { echo "Multiple mount targets specified in one "dracut_args"."
On Fri, Aug 10, 2018 at 8:36 AM Kenneth Dsouza kdsouza@redhat.com wrote:
From: Kenneth D'souza kdsouza@redhat.com
Currently the kdumpctl script doesn't check if the path option is set more than once due to which a vmcore is not captured.
This patch addresses this issue by ensuring that only one path is specified in /etc/kdump.conf file.
Signed-off-by: Kenneth D'souza kdsouza@redhat.com
kdumpctl | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 6a01c13..e07ec06 100755 --- a/kdumpctl +++ b/kdumpctl @@ -204,6 +204,13 @@ check_config() return 1 }
# Check if path option is set more than once.nr=$(awk 'BEGIN{cnt=0} /^path /{cnt++} END{print cnt}'$KDUMP_CONFIG_FILE)
[ $nr -gt 1 ] && {echo "Mutiple paths specifed in $KDUMP_CONFIG_FILE"return 1}nr=$(grep "^dracut_args .*\-\-mount" $KDUMP_CONFIG_FILE | grep -o"--mount" | wc -l) [ $nr -gt 1 ] && { echo "Multiple mount targets specified in one "dracut_args"." -- 2.14.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/...
I think this patch supposed to be v2 of "[PATCH] kdumpctl: Add path option in multi dump target checking." If so please use prefix [PATCH v2], and mention updates from v1 next time.
Acked-by: Kairui Song kasong@redhat.com
Will keep in mind.
On Tue, Aug 14, 2018 at 2:20 PM, Kairui Song kasong@redhat.com wrote:
On Fri, Aug 10, 2018 at 8:36 AM Kenneth Dsouza kdsouza@redhat.com wrote:
From: Kenneth D'souza kdsouza@redhat.com
Currently the kdumpctl script doesn't check if the path option is set more than once due to which a vmcore is not captured.
This patch addresses this issue by ensuring that only one path is specified in /etc/kdump.conf file.
Signed-off-by: Kenneth D'souza kdsouza@redhat.com
kdumpctl | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 6a01c13..e07ec06 100755 --- a/kdumpctl +++ b/kdumpctl @@ -204,6 +204,13 @@ check_config() return 1 }
# Check if path option is set more than once.nr=$(awk 'BEGIN{cnt=0} /^path /{cnt++} END{print cnt}'$KDUMP_CONFIG_FILE)
[ $nr -gt 1 ] && {echo "Mutiple paths specifed in $KDUMP_CONFIG_FILE"return 1}nr=$(grep "^dracut_args .*\-\-mount" $KDUMP_CONFIG_FILE | grep -o"--mount" | wc -l) [ $nr -gt 1 ] && { echo "Multiple mount targets specified in one "dracut_args"." -- 2.14.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org/...
I think this patch supposed to be v2 of "[PATCH] kdumpctl: Add path option in multi dump target checking." If so please use prefix [PATCH v2], and mention updates from v1 next time.
Acked-by: Kairui Song kasong@redhat.com
-- Best Regards, Kairui Song