4 ms·
Circular dependencies for socket activation and WireGuard
- 10000truths 2y agoI would expect any production-grade software dealing with a dependency graph to have cycle detection. Why doesn't systemd catch this kind of thing and emit a clear error saying "dependency cycle detected in A -> B -> C -> A"? Especially in cases where those dependencies are statically known - it should be able to detect this problem even before starting the services. Is there something I'm missing here? Are there any cases where a cyclical dependency is a legitimate requirement?
- nolist_policy 2y agoSystemd does detect and log cycles and breaks them by arbitrarily removing one dependency. Thought in this case there is an invisible (to systemd) dependency where a service depends on a network interface, but that interface is created by an arbitrary other service. So you have to manually create a dependency between these services to make it visible.