Bug 852335 - nut-server.service fails to start at boot when nut is configured in netserver mode
nut-server.service fails to start at boot when nut is configured in netserver...
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-08-28 04:34 EDT by Dan Ziemba
Modified: 2013-01-14 15:19 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-01-14 15:19:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
log excerpt from /var/log/messages at boot (9.86 KB, text/plain)
2012-08-28 04:34 EDT, Dan Ziemba
no flags Details
boot.log (54.63 KB, application/octet-stream)
2012-09-06 09:48 EDT, Dan Ziemba
no flags Details

  None (edit)
Description Dan Ziemba 2012-08-28 04:34:23 EDT
Created attachment 607443 [details]
log excerpt from /var/log/messages at boot

Description of problem:
When nut is running in netserver mode, nut-server.service fails to start at system boot.  Running `systemctl start nut-server.service` after boot completes works fine.  

In upsd.conf, I have nut set to listen on localhost and  The machine gets that address from DHCP, but it is always the same, so hard-coding it shouldn't be an issue (Oddly nut seems to have no option to specify an interface without knowing its ip).

Despite the nut-server.service file having "After=network.target", the service gets started before network manager, causing it to fail because the network interface isn't up yet.  I'm not sure if this is a bug with the service files, or a bug with systemd.

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

How reproducible:

Steps to Reproduce:
1. Install nut and configure in netserver mode.
2. Set listen address to network interface's ip and enable start at boot.
3. Reboot.
Actual results:
Service doesn't start as expected.  nut-driver and nut-monitor services still load.

Expected results:
nut-server service starts andl functions as configured.

Additional info:
Log file is attached.
Comment 1 Dan Ziemba 2012-08-28 04:47:15 EDT
I've just tried switching to a manual address instead of DHCP, but the same problem is still happening.  nut-server still tries to start before NetworkManager brings up the interface.
Comment 2 Michal Hlavinka 2012-09-05 13:41:57 EDT
please attach /var/log/boot.log
Comment 3 Dan Ziemba 2012-09-06 09:48:32 EDT
Created attachment 610339 [details]
Comment 4 Michal Hlavinka 2012-09-17 11:02:33 EDT
Looking at boot.log, nut starts after NetworkManager.

The problem is that "After=network.target" is quite useless. It does not mean the network is ready. What it means is that NetworkManager has started, but not necessarily that all interfaces were brought up. We can't change the "After=" to anything, because there is no "online.target" or anything that would trigger when network is really usable. Unfortunately, this is one of the design flaws.
Comment 5 Lennart Poettering 2012-09-17 13:00:50 EDT
Does "systemctl enable NetworkManager-wait-online.service" fix your issue?
Comment 6 Lennart Poettering 2013-01-14 15:19:54 EST
No response, so closing.

Note You need to log in before you can comment on or make changes to this bug.