Bug 1409669

Summary: Dependency failed for Network Manager Wait Online when using network.service
Product: [Fedora] Fedora Reporter: dan
Component: NetworkManagerAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: dcbw, extras-qa, fgiudici, germano.massullo, jklimes, lkundrak, lnykryn, msekleta, nfd, thaller
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1141961 Environment:
Last Closed: 2017-08-28 08:31:42 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 dan 2017-01-02 23:38:17 UTC
This issue has come up for me in FC25 after I disabled NetworkManager.service to use the plain network service.

NetworkManager.service had to be disabled because of an issue I was having with V6/Sendmail/NetworkManager reported in a separate bug (1409596).


+++ This bug was initially created as a clone of Bug #1141961 +++

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.9.0-44.git20131003.fc20.x86_64

How reproducible: Always

Steps to Reproduce:
1.  Disable NetworkManager and NetworkManager-wait-online with systemctl.
2.  Configure the network service.
3.  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:
Closely related to
  https://bugzilla.redhat.com/show_bug.cgi?id=921774
  NetworkManager-wait-online reports dependency errors
  when using network.service
which was closed for Fedora 19 because the warnings magically disappeared.

However, the bug is still present in Fedora 20.

Quite likely, the culprit is the NetworkManager-provided symlink
  /usr/lib/systemd/system/network-online.target.wants/NetworkManager-wait-online.service
which targets
  /usr/lib/systemd/system/NetworkManager-wait-online.service

In fact, removing this symlink eliminates the 
  "Dependency failed for Network Manager Wait Online."
on boot.

Note that network.service Wants network-online.target, which is ordered After NetworkManager-wait-online.service (OK). However, there should NOT be a

  network-online.target Wants ---> NetworkManager-wait-online.service  (1)

dependency, because NetworkManager-wait-online.service cannot be started given that we've disabled NetworkManager.

                               *****
Also related is
  https://bugzilla.redhat.com/show_bug.cgi?id=997318
  NetworkManager-wait-online.service should pull in network-online.target

C1 (2013-08-28) confirms that a

  NetworkManager-wait-online.service Wants ---> network-online.target  (2)

relation -- the reverse of the above relation (1) -- should actually be present and soon be in Fedora 20.

However, that is not yet the case:

  # systemctl show -p "Wants" NetworkManager-wait-online.service
  Wants=network.target system.slice

which is confirmed by the .service file:

# cat NetworkManager-wait-online.service 
[Unit]
Description=Network Manager Wait Online
Requisite=NetworkManager.service
After=NetworkManager.service
Wants=network.target        # ==> Should be: Wants=network-online.target
Before=network.target network-online.target

[Service]
Type=oneshot
ExecStart=/usr/bin/nm-online -s -q --timeout=30

[Install]
WantedBy=multi-user.target
%-----

Is the fix for NetworkManager-wait-online.service perhaps stuck somewhere upstream?

Thanks!

--- Additional comment from Jirka Klimes on 2015-03-24 09:49:44 EDT ---

There was a discussion about NetworkManager-wait-online.service in bug 1076053. Unfortunately, it was not finished and decided whether the unit is right at that time. So lets ask systemd guys once more how the unit should look like.

--- Additional comment from Lukáš Nykrýn on 2015-03-25 11:43:55 EDT ---

I don't think that there is a clean solution. I would suggest to leave things as is in released fedoras. And that drop the symlink and set WantedByt to network-online target, maybe also have the Also to this unitfile in NetworkManager service.

--- Additional comment from Fedora End Of Life on 2015-05-29 08:53:10 EDT ---

This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Fedora End Of Life on 2015-06-29 18:33:04 EDT ---

Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 1 Thomas Haller 2017-08-28 08:31:42 UTC
I am gonna close this. There is not enough fresh information attached to this bug.

The cloned bug 1141961 is very old. Very likely that issue there is already fixed and whatever you see, has a different cause. Even if the underlying cause happens to be the same as bug 1141961, it would require a fresh analysis (including debug data) -- because apparently the provided information is not yet enough to solve it.


This could however be the same issue as bug 1455704. In that case, it's due to NetworkManager.rpm always installing /usr/lib/systemd/system/network-online.target.wants/NetworkManager-wait-online.service.
The workaround could be to delete that file (which you could do to test the issue, it isn't a real solution because package-update would restore the file).
Alternatively do `systemctl mask NetworkManager-wait-online.service`.