-
Notifications
You must be signed in to change notification settings - Fork 30
Ignition shouldn't use systemd presets to enable units #2244
Comments
I'd need to dig into this a bit more, but I think this would not work with services provided via torcx as the service units do not yet exist when ignition is run. Moreover I think the decision to using presets came after lessons learned from cloudinit issues, but I don't have the specific details at hand. |
To duplicate some discussion with @bgilbert: It seems plausible that we could split In the case of "things that exist", we can create symlinks. This includes aliases and templated units. For things that don't, we could use a preset + log a warning. This would include torcx units and other units not written by Ignition directly. Perhaps in the long term torcx should have an initrd component which handles unit enablement in its own way, and somehow coordinates with Ignition's intent to let user's override it? |
A torcx initrd component seems to add significant complexity. In principle any unit written but not enabled by a generator would need to be enabled via preset (i.e. it's not necessarily just a torcx issue) but I don't know if that's common. Logging a warning would address #2243, and as an additional notification mechanism we could write a unit whose sole job is to fail if any of the units enabled via preset weren't actually enabled. |
Just to be sure I understand so far:
would break torcx? |
IIRC |
See systemd/systemd#7631 for systemctl and dbus. |
In the end |
I see a few paths here. One is to enhance systemd in some way to make this nicer. It could be enhancing the preset file. For #2243, it could be as simple as:
Which would be like That said, we could likely kill all of these issues at once if (as this issue suggests) we don't use presets, but instead write out a small systemd service that runs in early boot that does basically:
|
One of the major lessons from coreos-cloudinit is that services shouldn't be fiddling with the boot process. We could use a generator, though. |
The tricky thing there is generators are designed to be transient. So Ignition would have to write out something like |
It sounds like we need to figure out what failure in the real root looks like. We generally want failures to take the machine down entirely (e.g. Ignition failures prevent the switch-root from ever happening). Failing in the real root is less "bulletproof" as failing in the initramfs. Users can work around it and it doesn't set off all sorts of alarms like the initramfs failures. |
Moved to coreos/ignition#588. |
Issue Report
Environment
Any
Desired Feature
Ignition should create the requisite unit symlinks itself, rather than using systemd presets.
Other Information
This would solve multiple problems: #2209, #2241, #2243.
The text was updated successfully, but these errors were encountered: