Summary: | sysv-generator incorrectly handles sysv services that require network-online: it makes network-online.target Want those services, causing them to be started unexpectedly | ||
---|---|---|---|
Product: | systemd | Reporter: | Adam Williamson <adamw> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | critical | ||
Priority: | medium | CC: | bruno, mbiebl |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Adam Williamson
2014-06-25 20:54:09 UTC
Small correction to this part: "This also applies to Should-Start and I think to NetworkManager-wait-online - I think this will be triggered by anything considered to match SPECIAL_NETWORK_ONLINE_TARGET in sysv-generator around line 515" The bug really only affects the SysV "$network" service, I think, it does not affect NetworkManager-wait-online. I was fooled by /etc/init.d/network on Fedora, which has this stanza: ### BEGIN INIT INFO # Provides: $network # Should-Start: iptables ip6tables NetworkManager-wait-online NetworkManager # Short-Description: Bring up/down networking # Description: Bring up/down networking ### END INIT INFO If the "Provides: $network" line is present, network.service will be in /run/systemd/generator.late/network-online.target.wants/ . If I remove that line, it is not. I don't think that's correct either, but it's interestingly different. I believe that case is hitting the code around the comment: /* NB: SysV targets * which are provided * by a service are * pulled in by the * services, as an * indication that the * generic service is * now available. This * is strictly * one-way. The * targets do NOT pull * in the SysV * services! */ So...yeah, mo' problems. Thomas has pushed a fix to master: http://cgit.freedesktop.org/systemd/systemd/commit/?id=260ad50f5b4a9795032e3119c64f838a2d03370d I've tested it, using a Fedora Rawhide scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=7076868 It seems to work well, fixes the problems I'd observed, and the patch makes sense to me. It should probably go to the 214-stable branch too. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.