Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Not a new RHEL8 issue, same issue can be reproduced in RHEL-7 GA.
When building kdump initramfs for a SSH dump target, mkdumprd would check whether it has the write permission on $DUMP_TARGET:$SAVE_PATH
mkdir_save_path_ssh()
{
...
#check whether user has write permission on $SAVE_PATH/$DUMP_TARGET
_dir=$(ssh -qn $_opt $1 mktemp -dqp $SAVE_PATH 2>/dev/null)
_ret=$?
if [ $_ret -ne 0 ]; then
perror_exit "Could not create temporary directory on $DUMP_TARGET:$SAVE_PATH. Make sure user has write permission on destination"
fi
...
}
However $DUMP_TARGET is missing in the actual error message when the user doesn't not have the write permission:
[root@hp-dl380pg8-02 ~]# kdumpctl rebuild
Rebuilding /boot/initramfs-3.10.0-1105.el7.x86_64kdump.img
Could not create temporary directory on :/var/crash/test. Make sure user has write permission on destination
mkdumprd: failed to make kdump initrd
Note, make sure the $SAVE_PATH already exists on $DUMP_TARGET, otherwise it would fail earlier in kdumpctl.check_and_wait_network_ready().
Version-Release number of selected component (if applicable):
[root@kvm-01-guest01 ~]# uname -rn
kvm-01-guest01.rhts.eng.tlv.redhat.com 4.18.0-179.el8.x86_64
[root@kvm-01-guest01 ~]# rpm -qa kexec-tools
kexec-tools-2.0.20-14.el8.x86_64
How reproducible:
always
Steps to Reproduce:
1. Set a SSH dump target in /etc/kdump.conf
# cat /etc/kdump.conf
path /var/crash/test
core_collector makedumpfile -l --message-level 1 -d 31 -F
ssh kdump.eng.pek2.redhat.com
2. Make sure kdump_id_rsa pub keys has propagated to SSH server.
Make sure user 'kdump' doesn't have write permission on /var/crash/test
Make sure /var/crash/test has already been created on SSH server.
3. run `kdumpctl restart` or `kdumpctl rebuild`
Fail is expected with a proper error message.
Actual results:
$DUMP_TARGET is not printed in the error message
[root@kvm-01-guest01 ~]# kdumpctl restart
kexec: unloaded kdump kernel
Stopping kdump: [OK]
Detected change(s) in the following file(s):
/etc/kdump.conf
Rebuilding /boot/initramfs-4.18.0-179.el8.x86_64kdump.img
Could not create temporary directory on :/home/bhsharma/test. Make sure user has write permission on destination
mkdumprd: failed to make kdump initrd
Starting kdump: [FAILED]
Expected results:
$DUMP_TARGET should be printed in the error message
Description of problem: Not a new RHEL8 issue, same issue can be reproduced in RHEL-7 GA. When building kdump initramfs for a SSH dump target, mkdumprd would check whether it has the write permission on $DUMP_TARGET:$SAVE_PATH mkdir_save_path_ssh() { ... #check whether user has write permission on $SAVE_PATH/$DUMP_TARGET _dir=$(ssh -qn $_opt $1 mktemp -dqp $SAVE_PATH 2>/dev/null) _ret=$? if [ $_ret -ne 0 ]; then perror_exit "Could not create temporary directory on $DUMP_TARGET:$SAVE_PATH. Make sure user has write permission on destination" fi ... } However $DUMP_TARGET is missing in the actual error message when the user doesn't not have the write permission: [root@hp-dl380pg8-02 ~]# kdumpctl rebuild Rebuilding /boot/initramfs-3.10.0-1105.el7.x86_64kdump.img Could not create temporary directory on :/var/crash/test. Make sure user has write permission on destination mkdumprd: failed to make kdump initrd Note, make sure the $SAVE_PATH already exists on $DUMP_TARGET, otherwise it would fail earlier in kdumpctl.check_and_wait_network_ready(). Version-Release number of selected component (if applicable): [root@kvm-01-guest01 ~]# uname -rn kvm-01-guest01.rhts.eng.tlv.redhat.com 4.18.0-179.el8.x86_64 [root@kvm-01-guest01 ~]# rpm -qa kexec-tools kexec-tools-2.0.20-14.el8.x86_64 How reproducible: always Steps to Reproduce: 1. Set a SSH dump target in /etc/kdump.conf # cat /etc/kdump.conf path /var/crash/test core_collector makedumpfile -l --message-level 1 -d 31 -F ssh kdump.eng.pek2.redhat.com 2. Make sure kdump_id_rsa pub keys has propagated to SSH server. Make sure user 'kdump' doesn't have write permission on /var/crash/test Make sure /var/crash/test has already been created on SSH server. 3. run `kdumpctl restart` or `kdumpctl rebuild` Fail is expected with a proper error message. Actual results: $DUMP_TARGET is not printed in the error message [root@kvm-01-guest01 ~]# kdumpctl restart kexec: unloaded kdump kernel Stopping kdump: [OK] Detected change(s) in the following file(s): /etc/kdump.conf Rebuilding /boot/initramfs-4.18.0-179.el8.x86_64kdump.img Could not create temporary directory on :/home/bhsharma/test. Make sure user has write permission on destination mkdumprd: failed to make kdump initrd Starting kdump: [FAILED] Expected results: $DUMP_TARGET should be printed in the error message