Skip to content

Commit

Permalink
Reverts and further refines 1d757f4
Browse files Browse the repository at this point in the history
See #2847
This one was merged with not enough testing : it turns out the kernel
arg is only visible to dracut, which turns it into a drop-in file, in
/etc/cmdline.d/60kdumpip.conf

Adding this as a condition to the sysroot.mount generator makes systemd
skip the mount unit in kdump initramfs (only when kdump is configured to
export logs to a remote IP)

Ref https://issues.redhat.com/browse/OCPBUGS-29762
  • Loading branch information
jbtrystram committed Mar 8, 2024
1 parent f10ac79 commit fec436c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ mkdir -p ${UNIT_DIR}
# to run if there's already a root= karg, where the systemd-fstab-generator
# should win.
# We also don't want to generate sysroot.mount if we are booting a kdump kernel
# that aims to upload logs to a remote target, as the XFS kernel module won't be loaded
# that aims to upload logs to a remote target, as we may be in a diskless setup
# https://issues.redhat.com/browse/OCPBUGS-27935
# FIXME: this kdump case should be removed when we are done with https://github.com/coreos/fedora-coreos-tracker/issues/1675
if test -n "$(cmdline_arg ostree)" && test -z "$(cmdline_arg root)" && test -z "$(cmdline_arg kdump_remote_ip)"; then
if test -n "$(cmdline_arg ostree)" && test -z "$(cmdline_arg root)"; then
cat >${UNIT_DIR}/sysroot.mount << 'EOF'
[Unit]
Before=initrd-root-fs.target
After=coreos-rootflags.service
ConditionPathExists=!/etc/cmdline.d/60kdumpip.conf
[Mount]
EnvironmentFile=/run/coreos-rootflags
What=/dev/disk/by-label/root
Expand Down

0 comments on commit fec436c

Please sign in to comment.