Bug 1785371 - kdump initramfs is always regenerated if built with '--mount'
Summary: kdump initramfs is always regenerated if built with '--mount'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kexec-tools
Version: 32
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kairui Song
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-19 19:12 UTC by Scott Moser
Modified: 2020-04-08 05:06 UTC (History)
3 users (show)

Fixed In Version: kexec-tools-2.0.20-11.fc32 kexec-tools-2.0.20-11.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-01 00:17:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Scott Moser 2019-12-19 19:12:39 UTC
Description of problem:

When kdumpctl invokes dracut and there is a 'path' entry in /etc/kdump.conf, ,
the '--mount' argument that it uses will look like this:


   /sbin/dracut --quiet \
      --hostonly --hostonly-cmdline --hostonly-i18n --hostonly-mode strict \
      -o "plymouth dash resume ifcfg" \
      --mount "/dev/mapper/vg0/logs /kdumproot//logs ext4 defaults" \
      --no-hostonly-default-device \
      -f /boot/initramfs-4.14.0-1kdump.img 4.14.0-1

Intersting is that the '--mount' contains '/kdumproot//logs' (two slashes).

I was trying to pre-generate this initramfs on my own, but when doing
so, I provided it with a "cleaner" value for --mount:

    --mount "/dev/mapper/vg0/logs /kdumproot/logs ext4 defaults"


That triggers kdumpctl to "Detected change in File System"
as it compares 
   _new_mnt_point
to
   _old_mnt_point

_new_mnt_point gets set to:

    _new_mntpoint="/kdumproot/$(get_mntpoint_from_target $_target)"


So it is basically guaranteed to have a second '/'.


How reproducible:

Steps to Reproduce:
1. Remove kdump initramfs

   rm /boot/*-kdump

    dracut --no-hostonly -v -o "plymouth dash resume ifcfg" \
       --mount "/dev/mapper/vg0-logs /kdumproot/logs"
2. Set a value for path in /etc/kdump.conf:

    path /logs/crash

3. rm /boot/*kdump.img 
4. kdumpctl stop
5. kdumpctl start

You'll see that dracut is invoked with two / in the second argument to mount.

Additional info:

This isn't really all that big of a deal if kdumpctl is the only thing that is
going to generate an initramfs, but if anyone tries to do what I did, then
they're likely to hit the same issue.

The fix would be really just to clean the two paths for '_new_mntpoint' and
'_old_mntpoint' before comparing.

Comment 1 Ben Cotton 2020-02-11 17:39:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 2 Fedora Update System 2020-03-23 19:01:25 UTC
FEDORA-2020-47cd522de5 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-47cd522de5

Comment 3 Fedora Update System 2020-03-24 01:52:36 UTC
FEDORA-2020-d73f5db86c has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-d73f5db86c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d73f5db86c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2020-03-24 09:41:21 UTC
FEDORA-2020-47cd522de5 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-47cd522de5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-47cd522de5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2020-04-01 00:17:43 UTC
FEDORA-2020-d73f5db86c has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2020-04-01 16:32:33 UTC
FEDORA-2020-d73f5db86c has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2020-04-08 05:06:42 UTC
FEDORA-2020-47cd522de5 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.