Without this patch, when there are two or more spaces after 'path' configuration phrase with ssh or nfs setting, SAVE_PATH is set to '/var/crash' in mkdumprd, and in most cases kdump service fails to start.
ssh kdump@192.168.122.1 path /kdump ^^
This behavior would be too sensitive and different from the other configurations. With this patch, mkdumprd allows such spaces.
Signed-off-by: Kazuhito Hagio k-hagio@ab.jp.nec.com --- mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd index a6f7fe8..aa0abfd 100644 --- a/mkdumprd +++ b/mkdumprd @@ -13,7 +13,7 @@ export IN_KDUMP=1
conf_file="/etc/kdump.conf" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" -SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) +SAVE_PATH=$(awk '/^path/ {print $2}' $conf_file) [ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH # strip the duplicated "/" SAVE_PATH=$(echo $SAVE_PATH | tr -s /)
Hi Kazuhito,
Kazuhito Hagio k-hagio@ab.jp.nec.com 于2022年5月26日周四 12:42写道:
Without this patch, when there are two or more spaces after 'path' configuration phrase with ssh or nfs setting, SAVE_PATH is set to '/var/crash' in mkdumprd, and in most cases kdump service fails to start.
ssh kdump@192.168.122.1 path /kdump ^^
This behavior would be too sensitive and different from the other configurations. With this patch, mkdumprd allows such spaces.
Signed-off-by: Kazuhito Hagio k-hagio@ab.jp.nec.com
mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd index a6f7fe8..aa0abfd 100644 --- a/mkdumprd +++ b/mkdumprd @@ -13,7 +13,7 @@ export IN_KDUMP=1
conf_file="/etc/kdump.conf" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" -SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) +SAVE_PATH=$(awk '/^path/ {print $2}' $conf_file) [ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH # strip the duplicated "/" SAVE_PATH=$(echo $SAVE_PATH | tr -s /) -- 2.18.0
commit fd7e7be ('mkdumprd: Use get_save_path instead of parsing config') have already converted all path parsing code in mkdumprd to use get_save_path, which covers all the corner cases, I think you might be using an outdated code base? Or maybe this patch is not for Fedora kexec-tools?
Hello Kairui, List moderators,
On 2022/05/26 22:51, Kairui Song wrote:
commit fd7e7be ('mkdumprd: Use get_save_path instead of parsing config') have already converted all path parsing code in mkdumprd to use get_save_path, which covers all the corner cases, I think you might be using an outdated code base? Or maybe this patch is not for Fedora kexec-tools?
It looks like the email sent by the list system yesterday is the email I sent in 2018, please see the header:
Date: Tue, 11 Dec 2018 11:02:57 -0500
I don't know why it was sent by the system again. (and there is no log of sending it yesterday at my end :)
It looks like several old emails were received yesterday. Did the list moderators do something?
Thanks, Kazu
Hi Kazu and Kairui,
On Thu, May 26, 2022 at 11:45:30PM +0000, HAGIO KAZUHITO(萩尾 一仁) wrote:
Hello Kairui, List moderators,
On 2022/05/26 22:51, Kairui Song wrote:
commit fd7e7be ('mkdumprd: Use get_save_path instead of parsing config') have already converted all path parsing code in mkdumprd to use get_save_path, which covers all the corner cases, I think you might be using an outdated code base? Or maybe this patch is not for Fedora kexec-tools?
It looks like the email sent by the list system yesterday is the email I sent in 2018, please see the header:
Date: Tue, 11 Dec 2018 11:02:57 -0500
I don't know why it was sent by the system again. (and there is no log of sending it yesterday at my end :)
It looks like several old emails were received yesterday. Did the list moderators do something?
Sorry for the confusion! Yes, I released a few pending emails yesterday so the email archives could be complete. Please ignore them.
Thanks, Kazu _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure