-
Notifications
You must be signed in to change notification settings - Fork 881
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
Systemd boot order #5755
Comments
I don't think that this explains the issue. Can you please include output from the following commands on a system where this service didn't start? $ systemctl list-jobs --after
$ systemctl --failed
$ dmesg -T | grep -i -e warning -e error -e fatal -e exception
$ journalctl -xe |
Hi @holmanb As requested:
The journactl output has been filtered to show the ordering cycle issue, and the subsequent failures of the other services (as no sockets are present):
Please note that, cloud-init-main.service starts as expected, as soon as I remove the
I am wondering if it is intended that the |
Thanks @benj-n, thanks for reporting and diagnosing. Yes it seems the recent single process change probably allowed Could you please share your build process? I'd like to reproduce this and investigate to validate the fix. A reproducer would be appreciated. Long term we should strive to reduce/eliminate this template complexity and seek an order which satisfies the needs of all/most distros. In theory systemd provides the mechanics required for a unified upstream service ordering (i.e. service ordering on non-existent services is a no-op). There may be some edge cases, but I think that we can simplify, and possibly even eliminate the templating for some, if not all of the services. In the meantime, since this change appears to have been unintentional, we should probably remove the accidental change. |
Hi @holmanb The build process: Arch Linux was freshly installed from 2024.10 ISO. The post install config in chroot included:
Once rebooted on disk, the package itself was built with the following process
|
Thank you so much for the debugging and I ran into this today after upgrading and use the new image on a fresh AWS instance. I ran into the nc.openbsd dependency issue as well. |
Thanks @benj-n for identifying and debugging the issue, and @min-xu-et for reporting. I just submitted #5819 to resolve this issue. |
Thank you @holmanb ! Will/have the nc.openbsd issue be addressed as well? |
@min-xu-et see #5696, I think that this has already been addressed. |
Since After=sysinit.target is a default dependency, a cycle is introduced when Before=sysinit.target and not DefaultDependencies=no. Fixes canonicalGH-5755
Since After=sysinit.target is a default dependency, a cycle is introduced when Before=sysinit.target and not DefaultDependencies=no. Fixes canonicalGH-5755
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:
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 withWants=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.target
andConflicts=shutdown.target
outside theif
statement were not meant to be merged. It could be nice to have @holmanb thoughts on this.Environment details
The text was updated successfully, but these errors were encountered: