Skip to content
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

/etc/systemd/system-preset/20-ignition.preset is not reproducible #1339

Closed
mkenigs opened this issue Mar 24, 2022 · 2 comments · Fixed by #1389
Closed

/etc/systemd/system-preset/20-ignition.preset is not reproducible #1339

mkenigs opened this issue Mar 24, 2022 · 2 comments · Fixed by #1389
Assignees
Labels
jira for syncing to jira

Comments

@mkenigs
Copy link

mkenigs commented Mar 24, 2022

Bug

Ignition Version

Ignition v2.13.0-32-g9132ad09

Environment

I ran ignition-liveapply in an OpenShift build with two different inputs, but I only changed files and didn't touch systemd units

Expected Behavior

/etc/systemd/system-preset/20-ignition.preset is the same for both runs

Actual Behavior

/etc/systemd/system-preset/20-ignition.preset contains the same services in a different order

@jlebon
Copy link
Member

jlebon commented Mar 24, 2022

See also #588 which would have Ignition stop using presets entirely.

@travier
Copy link
Member

travier commented Apr 4, 2022

Seems like we have to sort the list writing in into the file?

@marmijo marmijo added the jira for syncing to jira label May 16, 2022
@marmijo marmijo self-assigned this May 16, 2022
marmijo added a commit to marmijo/ignition that referenced this issue Jun 1, 2022
marmijo added a commit to marmijo/ignition that referenced this issue Jun 1, 2022
Sort unit presets in alphabetical order in the 20-ignition.preset file
to ensure the preset file is in a consistent order

Fixes coreos#1339
marmijo added a commit to marmijo/ignition that referenced this issue Jun 1, 2022
Sort unit presets in alphabetical order in the 20-ignition.preset file
to ensure the preset file is in a consistent order

Fixes coreos#1339
marmijo added a commit to marmijo/ignition that referenced this issue Jun 2, 2022
The 20-ignition.preset file is used in CoreOS layering. The contents
of this file will be sorted in alphabetical order by unit name to ensure
the file is written in a consistent order across multiple runs.

Fixes coreos#1339
marmijo added a commit to marmijo/ignition that referenced this issue Jun 2, 2022
The 20-ignition.preset file is used in CoreOS layering. The contents
of this file will be sorted in alphabetical order by unit name to ensure
the file is written in a consistent order across multiple runs.

Fixes coreos#1339
marmijo added a commit to marmijo/ignition that referenced this issue Jun 2, 2022
The 20-ignition.preset file is used in CoreOS layering. The contents
of this file will be sorted in alphabetical order by unit name to ensure
the file is written in a consistent order across multiple runs.

Fixes coreos#1339
marmijo added a commit to marmijo/ignition that referenced this issue Jun 3, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira for syncing to jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants