Bug 921774

Summary: NetworkManager-wait-online reports dependency errors when using network.service
Product: [Fedora] Fedora Reporter: Elliott Forney <elliott.forney>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 19CC: danw, dcbw, hhorak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-28 18:26:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Elliott Forney 2013-03-14 21:25:22 UTC
Description of problem:

When NetworkManager and NetworkManager-wait-online are disabled (using the plain network service instead), missing dependencies on NetworkManager-wait-online are reported during boot.

Version-Release number of selected component (if applicable):

NetworkManager-0.9.8.0-1.fc18.x86_64

How reproducible:

Always.

Steps to Reproduce:
1.  Disable NetworkManager and NetworkManager-wait-online with systemctl.
2.  Configure the network service.
3.  Configure ypbind and/or xinetd with systemctl.
4.  Reboot

Actual results:

The following error is logged:

# grep -B1 DEPEND /var/log/boot.log 
[ INFO ] Network Manager is not active.
[DEPEND] Dependency failed for Network Manager Wait Online.

Expected results:

Since NetworkManager is disabled, there should be no related error messages during boot.

Additional info:

Looks like ypbind and xinetd depend on NetworkManager-wait-online:

# grep -Ri wait-online *
system/ypbind.service:After=syslog.target network.target rpcbind.service ypserv.service NetworkManager-wait-online.service
system/NetworkManager.service:Also=NetworkManager-wait-online.service
system/xinetd.service:After=syslog.target network.target NetworkManager-wait-online.service

This seems silly to me.  What is the purpose of NetworkManager-wait-online?  Isn't this what the network.target is for?

ypbind and xinetd should NOT depend on NetworkManager related services.  These services do not require NetworkManager to function at all.  The network.service is often preferable and should work without errors.

Comment 1 Dan Winship 2013-08-28 18:26:29 UTC
This isn't a NetworkManager bug. Please file bugs against ypbind and xinetd; they do not need to depend on NetworkManager-wait-online, they should only depend on network.target (which, as of rawhide/F20 will automatically depend on NetworkManager-wait-online if it is enabled).

Comment 2 Elliott Forney 2013-08-28 20:20:32 UTC
Filed bugs for xinetd and ypbind:

Bug 1002294
Bug 1002295

Comment 3 Honza Horak 2013-08-29 10:30:53 UTC
Hm, I don't think we need to remove After=NetworkManager-wait-online.service. Since After= is only an ordering information (see systemd.unit(5)) and there is no other dependency on such service (no Requries=, Wants= or Also=), it shouldn't do any harm even if NetworkManager-wait-online.service is disabled/not installed at all.

Elliot, are you sure the DEPEND error message vanishes after removing After=NetworkManager-wait-online.service from xinetd and ypbind unit files?

Comment 4 Dan Winship 2013-08-29 12:01:54 UTC
I got it wrong before; you should replace NetworkManager-wait-online.service with network-online.target. That's the new abstracted target (in systemd >= 200), which is equivalent to NetworkManager-wait-online target when NM is active, but might make use of some other service in spins/distros that don't use NM.

Comment 5 Elliott Forney 2013-10-01 19:49:52 UTC
These warnings appear to have gone away for me with recent updates.  I'm not sure that changing the After= is what actually did the trick but it is probably best to use network-online.target instead of NetworkManager-wait-online.service in any case.  Thank you for your help!