Bug report
Hi,
While I was building an ArchLinux package based on cloud-init 24.3.1, I found that cloud-init-main.service was never started at boot. Trying to understand what was happening I found this in the service template:
https://github.com/canonical/cloud-init/blob/24.3.1/systemd/cloud-init-main.service.tmpl#L22-L30
First, there a double definition of:
Before=sysinit.target
Conflicts=shutdown.target
These lines appear in a if statement and outside.
Second, on some OS (I was working on Arch, but it may not be limited to it), the Before=sysinit.target conflicts with Wants=network-pre.target a few lines above (Sysinit.target happens before network-pre.target).
The more I look at it, the more I think the Before=sysinit.targetand Conflicts=shutdown.targetoutside the if statement were not meant to be merged. It could be nice to have @holmanb thoughts on this.
Environment details
- Cloud-init version: >=24.3.
- Operating System Distribution: Discovered on ArchLinux but shouldn't be relevant
- Cloud provider, platform or installer type: Discovered on Cloudstack but shouldn't be relevant
Bug report
Hi,
While I was building an ArchLinux package based on cloud-init 24.3.1, I found that
cloud-init-main.servicewas never started at boot. Trying to understand what was happening I found this in the service template:https://github.com/canonical/cloud-init/blob/24.3.1/systemd/cloud-init-main.service.tmpl#L22-L30
First, there a double definition of:
These lines appear in a
ifstatement and outside.Second, on some OS (I was working on Arch, but it may not be limited to it), the
Before=sysinit.targetconflicts withWants=network-pre.targeta few lines above (Sysinit.target happens before network-pre.target).The more I look at it, the more I think the
Before=sysinit.targetandConflicts=shutdown.targetoutside theifstatement were not meant to be merged. It could be nice to have @holmanb thoughts on this.Environment details