Bug 90824 - systemd-networkd shuts down 30s after launch if DHCP is disabled
Summary: systemd-networkd shuts down 30s after launch if DHCP is disabled
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Tom Gundersen
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-02 19:00 UTC by freedesk.apriori
Modified: 2016-06-07 10:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description freedesk.apriori 2015-06-02 19:00:22 UTC
When a systemd.network is set up to use a static IP, and DHCP is disabled, systemd-networkd shuts down exactly 30s or so after it has been launched and after it has configured the link. Is this intentional?

I’ve been wanting to monitor connectivity through the DBus interface, and have noticed that on machines with fixed IPs, this won’t work, because networkd prompty shuts down.


● systemd-networkd.service - Network Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Di 2015-06-02 20:57:48 CEST; 167ms ago
     Docs: man:systemd-networkd.service(8)
  Process: 4027 ExecStart=/usr/lib/systemd/systemd-networkd (code=exited, status=0/SUCCESS)
 Main PID: 4027 (code=exited, status=0/SUCCESS)
   Status: "Shutting down..."

Jun 02 20:57:18 ptk systemd[1]: Starting Network Service...
Jun 02 20:57:18 ptk systemd-networkd[4027]: Enumeration completed
Jun 02 20:57:18 ptk systemd[1]: Started Network Service.


I observe this using the following config:

[Match]
Name=en*

[Network]
DNS=8.8.8.8
Address=192.168.0.2/24
Gateway=192.168.0.1
DHCP=none
Comment 1 freedesk.apriori 2015-06-02 19:03:06 UTC
Sorry, this is systemd 219.
Comment 2 Lennart Poettering 2015-06-09 22:49:00 UTC
networkd exits when it is idle. It is restarted by netlink events however should something change in the network state, and it hence should be without loss.

Are you saying the automatic restarting doesn't work, and it loses events?
Comment 3 freedesk.apriori 2015-06-10 07:28:35 UTC
Yes, that’s right. Even when pulling/reinserting the ethernet plug, networkd doesn’t come back to life, while the kernel makes a note of it, as shown in dmesg. networkd’s status remains «inactive (dead)», with no mention of loss of connectivity in its journal or any events sent over the dbus interface.

When I add DHCP to the .network config, loss of connectivity is noted by networkd, and also it will not go «inactive (dead)» after 30s.
Comment 4 Lennart Poettering 2016-06-07 10:55:22 UTC
Current networkd versions only exit when there's no network interface besides "lo" around. Closing this bug hence.


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.