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 dependency cycles easier to detect #3829
Comments
I guess a service which has been removed due to a dependency cycle could be treated similarly to a failing service. For the latter we switch into auto-verbose mode during boot and display that information to the user. Still, ideally we would also warn on |
Please increase verbosity of the cycle reporter. I've made one mistake or others and created systemd ordering cycles. These are very difficult to debug. Example output:
It would be more helpful to read a message such as this.
Or something like this. You might have a lot better ideas on how to provide useful debug information for such cases. |
somewhat related to #69 |
I found some kind of an inconvinient but good working solution:
Keep in mind that you might need to install the dependencies (networkx & pydotplus) and for that you also need python-pip. |
It would be really helpful if dependency cycles showed up in the logs for the service. Looking at the logs for my service showed nothing, but if I looked at the entire systems logs, then I found it in systemd's logs. |
personnaly, the only info I read from the log is "there is acycle somewhere" then I just ask systemd-analyze... |
That tool is very helpful, but the information should probably also be put in the logs for the service, or the service status when explaining why it didn't start. |
Submission type
systemd version the issue has been seen with
v231
As can be seen at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832802 , it's rather easy to introduce a dependency cycle by enabling a not carefully written unit file which hooks into one of the special targets (early boot, network-pre, etc).
One of the problem is, that systemd happily will kill a random service in the dependency cycle, not necessarily the newly added one.
It's also rather hard to notice that systemd removed a service or multiple services due to a dependency cycle unless it's a critical service which will make your system fail to boot.
One has to sift through journal logs to actually find out what's going on.
It would be good if we could either be more cautious in
systemctl enable
if a service introduces a dependency and warn about that.Or switch into verbose mode during boot when a dependency cycle is detected and output this information more prominently.
The text was updated successfully, but these errors were encountered: