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

Best usage practices: Starting early in boot #35

Open
pothos opened this issue Feb 1, 2024 · 1 comment
Open

Best usage practices: Starting early in boot #35

pothos opened this issue Feb 1, 2024 · 1 comment
Labels
feature New feature or request

Comments

@pothos
Copy link

pothos commented Feb 1, 2024

Current situation

The systemd unit provided looks like it would run in the final system.

Impact

The instance configuration can be racy because while the system is set up by the agent other services will already start and, e.g., an SSH provisioning helper or cloud-init would race with the agent.

Debatable whether this is desired behavior: The current usage also overwrites a static hostname because the unit is running late and because the unit runs at every boot and ignores a previously set static hostname.

Ideal future situation

Provide a systemd unit that runs in the initrd, and possibly a dracut module to pull it in. This is how Afterburn is used, too, e.g., when setting up the hostname. Similar is also how Ignition is used, which does the creation of user accounts from the initrd.

Then document how the unit should be installed in the initrd and that this is the recommended way compared to a unit on the final system.

**Implementation options

Additional information

@pothos
Copy link
Author

pothos commented May 3, 2024

I think it would make sense to follow what afterburn does: Have CLI arguments that define what action is done. This way one could do the hostname, network, and user setup in the initrd but the boot checkin in the final system based on CLI args.
For distros that also makes it a bit more flexible when integrating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant