-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dracut/ignition-ostree: Regenerate UUIDs for /boot and / #354
Conversation
ConditionKernelCommandLine=ostree | ||
ConditionPathExists=!/run/ostree-live | ||
# We run pretty early | ||
Before=coreos-copy-firstboot-network.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we switch to having a boot.mount
in the initramfs then this would just be:
Before=boot.mount
.
Yeah I'm in favor of a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Independent of coreos/fedora-coreos-tracker#465, I think this is a good idea. LGTM overall, just one nit!
ConditionPathExists=!/run/ostree-live | ||
# We run pretty early | ||
Before=coreos-copy-firstboot-network.service | ||
Before=ignition-fetch.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: we don't need this ordering here. It's already implied by being ordered Before=ignition-setup-{base,user}.service
below. (This is harmless of course, but it's a pet peeve of mine to have ordering requirements like this which seem to imply the order of all the Ignition stages aren't in fact strictly ordered.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this idea. Let's ship it.
For reasons I don't fully understand, trying to use `tune2fs -U random /dev/disk/by-label/boot` fails without this explicit fsck step, even though the filesystem appears cleanly unmounted. This is for coreos/fedora-coreos-config#354 to regenerate the UUID of `/boot` on firstboot. Anyways, explicitly unmounting things seems better than relying on `umount -R` to sort it, and having a `fsck` on `/boot` is cheap.
For reasons I don't fully understand, trying to use `tune2fs -U random /dev/disk/by-label/boot` fails without this explicit fsck step, even though the filesystem appears cleanly unmounted. This is for coreos/fedora-coreos-config#354 to regenerate the UUID of `/boot` on firstboot. Anyways, explicitly unmounting things seems better than relying on `umount -R` to sort it, and having a `fsck` on `/boot` is cheap.
Whee, some sort of race in an unrelated test:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me! Just one minor comment (there was also #354 (comment) from a previous review).
regenerate_uuid_if() { | ||
local path=$1 | ||
shift | ||
|
||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extraneous?
This is a general best practice; the intention of filesystem UUIDs is that they're unique. It helps backup systems and the like if we change this. This builds on coreos/coreos-assembler@e3905fd In the future, we may also switch to using these UUIDs for subsequent boots; see: coreos/fedora-coreos-tracker#465
This is now part of #503. |
This is a general best practice; the intention of filesystem
UUIDs is that they're unique. It helps backup systems and the like
if we change this.
But in the future, we may also switch to using these UUIDs for subsequent
boots; see: coreos/fedora-coreos-tracker#465