+++ This bug was initially created as a clone of Bug #703852 +++ [...] NetworkManager-wait-online.service is not working as expected. It quits immediately with a failure: [ 21.703189] systemd[1]: Job NetworkManager.service/start finished, result=done [ 21.706765] systemd[1]: About to execute: /usr/bin/nm-online -q -x --timeout=30 [ 21.723075] systemd[1]: Forked /usr/bin/nm-online as 814 [ 21.726549] systemd[1]: NetworkManager-wait-online.service changed dead -> start [ 21.865662] r8169 0000:02:00.0: em1: link down [ 21.868962] r8169 0000:02:00.0: em1: link down [ 21.872380] ADDRCONF(NETDEV_UP): em1: link is not ready [ 22.011777] systemd[1]: Got D-Bus request: org.freedesktop.DBus.NameOwnerChanged() on /org/freedesktop/DBus [ 22.016442] systemd[1]: Received SIGCHLD from PID 814 (nm-online). [ 22.019876] systemd[1]: Got SIGCHLD for process 814 (nm-online) [ 22.023156] systemd[1]: Child 814 died (code=exited, status=1/FAILURE) [ 22.026386] systemd[1]: Child 814 belongs to NetworkManager-wait-online.service [ 22.029609] systemd[1]: NetworkManager-wait-online.service: main process exited, code=exited, status=1 The link is not ready yet, therefore NM is not connecting. "-x" was passed to nm-online, so it quits. That's why the original NM initscript did something similar to: ExecStart=/bin/sh -c 'nm-online -q --timeout=10 || nm-online -q -x --timeout=30' (which is what I originally proposed for NetworkManager-wait-online.service)
The "-x" parameter was added to the service in 1:0.8.9997-1.git20110531.fc15
The '-x' is to make sure it doesn't spin excessively if NM isn't running at all - having the above wait 10 seconds seems like overkill.
(In reply to comment #2) > The '-x' is to make sure it doesn't spin excessively if NM isn't running at all Wouldn't that be a misconfiguration? Would adding Requisite=NetworkManager.service to the unit file do the right thing?
(In reply to comment #3) > (In reply to comment #2) > > The '-x' is to make sure it doesn't spin excessively if NM isn't running at all > > Wouldn't that be a misconfiguration? Perhaps, but I think you want enable/disable of NetworkManager.service to cause NM-wait-online.service to do the right thing. For example... > Would adding Requisite=NetworkManager.service to the unit file do the right > thing? No, because that would fail the transaction entirely if the admin disabled NM, but not NM-wait-online.
Created attachment 503013 [details] modified NetworkManager-wait-online.service (In reply to comment #4) > (In reply to comment #3) > > Would adding Requisite=NetworkManager.service to the unit file do the right > > thing? > > No, because that would fail the transaction entirely if the admin disabled NM, > but not NM-wait-online. In my testing it works fine. I removed the '-x', and added 'Requisite=NetworkManager.service'. Then tested with the intentionally wrong configuration: chkconfig network on systemctl enable NetworkManager-wait-online.service systemctl disable NetworkManager.service reboot The system boots without any trouble. In the debug log I can see NM-wait-online failing as expected and everything else is happy: ... [ 2.274090] systemd[1]: Installed new job network.service/start as 82 [ 2.274093] systemd[1]: Installed new job network.target/start as 83 [ 2.274096] systemd[1]: Installed new job NetworkManager-wait-online.service/start as 84 [ 2.274099] systemd[1]: Installed new job NetworkManager.service/verify-active as 85 ... [ 3.202838] systemd[1]: Job NetworkManager.service/verify-active finished, result=skipped [ 3.202865] systemd[1]: Job NetworkManager-wait-online.service/start finished, result=dependency [ 3.202890] systemd[1]: Job NetworkManager-wait-online.service/start failed with result 'dependency'. ... [ 3.224272] systemd[1]: About to execute: /etc/rc.d/init.d/network start [ 3.231816] systemd[1]: Forked /etc/rc.d/init.d/network as 430 [ 3.232588] systemd[1]: network.service changed dead -> start ... [ 7.510302] systemd[1]: network.service changed start -> running [ 7.510336] systemd[1]: Job network.service/start finished, result=done [ 7.517202] systemd[1]: network.target changed dead -> active [ 7.517212] systemd[1]: Job network.target/start finished, result=done
Bill, after reading the previous comment, do you still have any objections to the proposed change in NetworkManager-wait-online.service?
No.
Created attachment 505199 [details] [PATCH] systemd: fix NetworkManager-wait-online.service to wait for link up Dan, please apply the attached patch. Thanks.
Pushed: ffbb7df4b85c68aafe4578750a1f78fc9d734fb8 Thanks!
NetworkManager-0.8.9997-4.git20110620.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/NetworkManager-0.8.9997-4.git20110620.fc15
Package NetworkManager-0.8.9997-4.git20110620.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.9997-4.git20110620.fc15' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/NetworkManager-0.8.9997-4.git20110620.fc15 then log in and leave karma (feedback).
NetworkManager-0.8.9997-4.git20110620.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.