prepare-root/generator: drop /run/ostree/initramfs-mount-var support#3530
prepare-root/generator: drop /run/ostree/initramfs-mount-var support#3530champtar wants to merge 1 commit intoostreedev:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes obsolete support for /run/ostree/initramfs-mount-var. This feature was used to force mounting /var from ostree-prepare-root in the initramfs, even when systemd is expected to handle it. As noted in the description, this has been unused by Ignition for a long time and has been broken. The changes are straightforward and correct, improving maintainability by removing dead code. I have one minor suggestion to improve a comment's clarity.
| if (lstat (INITRAMFS_MOUNT_VAR, &stbuf) == 0) | ||
| mount_var = true; | ||
| #ifndef HAVE_SYSTEMD_AND_LIBMOUNT | ||
| /* When running under systemd, /var will be handled by a 'var.mount' unit outside of initramfs. |
There was a problem hiding this comment.
The first line of this comment is a bit confusing as it describes the systemd case, but this code block is executed when HAVE_SYSTEMD_AND_LIBMOUNT is not defined. To improve clarity, consider rephrasing this line to describe the case this code block handles.
/* When not using systemd to mount /var, we do it here from the initramfs.Ignition stopped using it in 2019 (coreos/ignition@852008f), and it has been broken for 2 years (ostreedev@64afbcd) (mkdirat(/run/ostree) fails if /run/ostree already exists)
f531a82 to
53c4df6
Compare
|
@cgwalters CI is green now for this one |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Ignition stopped using it in 2019 (coreos/ignition@852008f), and it has been broken for 2 years (64afbcd) (mkdirat(/run/ostree) fails if /run/ostree already exists)