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

Make sure /etc/machine-id is generate as early as possible in systemd #1178

Merged
merged 3 commits into from
Dec 18, 2024

Conversation

jimmykarily
Copy link
Contributor

@jimmykarily jimmykarily commented Dec 13, 2024

@jimmykarily jimmykarily requested a review from a team December 13, 2024 08:24
# https://www.freedesktop.org/software/systemd/man/latest/systemd-machine-id-commit.service.html
# https://www.freedesktop.org/software/systemd/man/latest/systemd-machine-id-setup.html
# Mask the commit service to avoid systemd messing with machine-id.
- ln -s /dev/null /etc/systemd/system/systemd-machine-id-commit.service
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally, since this service will kick in later, it should have no effect, so we shouldn't need to mask it but better safe than sorry?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmmh, cant we mask it on the base images directly? or use the systemctl plugin? https://github.com/mudler/yip?tab=readme-ov-file#stagesstageidstepnsystemctl

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we should run it on the rootfs, which is the earliest stage we got I think, so we mask it asap.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points, pushed a commit

Signed-off-by: Dimitris Karakasilis <[email protected]>
@mudler mudler merged commit 2a80ac9 into main Dec 18, 2024
11 checks passed
@mudler mudler deleted the 3038-ensure-machine-id-in-systemd branch December 18, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants