Skip to content

Commit

Permalink
ignition-ostree: make sure we don't mount /sysroot before transposefs…
Browse files Browse the repository at this point in the history
… is done

When enabling multipath the ignition-ostree-mount-firstboot-sysroot.service
loses to the systemd's generator, which causes /sysroot to be mounted before
we finish transposing the fs. This change makes sure we wait to mount
the /sysroot until we are done.
This was reported via: https://issues.redhat.com/browse/OCPBUGS-16157
  • Loading branch information
jmarrero committed Aug 1, 2023
1 parent 208630a commit 5d70098
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ After=ignition-disks.service
# Avoid racing with UUID regeneration
After=ignition-ostree-uuid-root.service
After=ignition-ostree-growfs.service
Before=initrd-root-fs.target
# https://issues.redhat.com/browse/OCPBUGS-16157
# On multipath systems mounting the /sysroot before
# the ignition-ostree services causes the transpose to fai.
Before=sysroot.mount
Before=ignition-ostree-transposefs-restore.service
OnFailure=emergency.target
OnFailureJobMode=isolate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ After=ignition-disks.service
After=ignition-ostree-uuid-root.service
After=ignition-ostree-growfs.service
Before=ignition-ostree-mount-firstboot-sysroot.service
# https://issues.redhat.com/browse/OCPBUGS-16157
# On multipath systems mounting the /sysroot before
# the ignition-ostree services causes the transpose to fai.
Before=initrd-root-fs.target
Before=sysroot.mount
OnFailure=emergency.target
OnFailureJobMode=isolate

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ ConditionKernelCommandLine=ostree
ConditionPathIsDirectory=/run/ignition-ostree-transposefs
# Any services looking at mounts need to order after this
# because it causes device re-probing.
# https://issues.redhat.com/browse/OCPBUGS-16157
# On multipath systems mounting the /sysroot before
# the ignition-ostree services causes the transpose to fai.
Before=initrd-root-fs.target
Before=sysroot.mount
After=coreos-gpt-setup.service
OnFailure=emergency.target
OnFailureJobMode=isolate
Expand Down

0 comments on commit 5d70098

Please sign in to comment.