-
Notifications
You must be signed in to change notification settings - Fork 243
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
units: Sort systemd presets in alphabetical order in 20-ignition.preset file #1389
Conversation
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.
For the record: let's add a positive blackbox test for this. We'll know we've regressed if it sometimes fails.
For the commit message, we usually add a context prefix. In this case, something like "files:" is probably fine, since this change is scoped to the files stage. Also, while it's good to link to the bug, we try to write the commit message with enough detail that the change is clear from the message alone.
d005ee8
to
7fc221e
Compare
80b80d3
to
e123285
Compare
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 good!
The first paragraph of the commit message is still a bit vague about why this matters. And I think I misled you a bit wrt CoreOS layering; that's a downstream FCOS/RHCOS concept that isn't directly relevant to Ignition upstream. It probably makes more sense to refer to I'm sorry to say I took the easy way out here, and rewrote the paragraph. Feel free to use this verbatim or rework to taste:
|
The lines of the 20-ignition.preset file were being written in arbitrary order. This shouldn't affect its semantics, but could cause ignition-apply to produce different filesystem trees from identical configs, breaking reproducible container builds. Sort the list of units before writing it out. Fixes coreos#1339
e123285
to
a46c71c
Compare
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.
🎉
Ignition would order the same content in 20-ignition.preset differently, so it had to be sorted manually, but that was fixed in coreos/ignition#1389
The 20-ignition.preset file is used in CoreOS layering. The contents of the file will be sorted in alphabetical order by unit name to ensure the file is written in a consistent order across multiple runs.
Fixes #1339