<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">Hi,<br>
<br>
I replaced dhcpcd with systemd-networkd dhcp on installing
systemd-210, and all works<br>
perfectly. Beginning with systemd-211, on every boot I'm getting
the systemd-networkd<br>
warning/error message:<br>
<br>
Failed to save link data /run/systemd/network/links/2: No such
file or directory<br>
<br>
<br>
So far as I can tell all is working fine (the network is up, and
once logged in,<br>
/run/systemd/network/links/2 is present), so I'm curious about why
this warning<br>
occurs. Is this issue occurring for anyone else ?<br>
<br>
<br>
My system: software-based,i686-pc-linux-gnu [Intel(R) Pentium(R) 4
CPU 3.00GHz];<br>
linux-3.13.6,binutils-2.24,glibc-2.19,gcc-4.8.2,systemd-211<br>
<br>
<br>
My systemd dhcp setup:<br>
<br>
$ ls /etc/systemd/network<br>
10-dhcp.network<br>
<br>
$ cat /etc/systemd/network/10-dhcp.network<br>
[Match]<br>
Name=[ew]*<br>
<br>
[Network]<br>
DHCP=yes<br>
<br>
I have rebuilt systemd with some added debug to determine the
codepath and error<br>
details; what I found is as follows:<br>
<br>
in systemd-211/src/network/networkd-manager.c<br>
a call to link_add():206<br>
in systemd-211/src/network/networkd-link.c, from
link_add():1293<br>
a call to link_configure():1280<br>
a call to link_enter_enslave():1290<br>
a call to link_save():1138<br>
a call to mkdir_safe_label():1370 to create
"/run/systemd/network/links"<br>
in systemd-211/src/shared/mkdir-label.c, from
mkdir_safe_label():39<br>
a call to mkdir_safe_internal():40, passing
label_mkdir<br>
in systemd-211/src/shared/mkdir.c, from
mkdir_safe_internal():34<br>
a call to _mkdir():37, _mkdir := label_mkdir():371
in systemd-211/src/shared/label.c<br>
a call to lstat():41<br>
<br>
<br>
In systemd-211/src/shared/mkdir.c, we have:<br>
<br>
37 if (_mkdir(path, mode) >= 0)
<---------------------------- the error actually occurs here,
but<br>
38 if (chmod_and_chown(path, mode, uid, gid) <
0) is detected in the lstat():41 call<br>
39 return -errno;<br>
40<br>
41 if (lstat(path, &st) < 0) <--- at this
point, only /run/systemd exists, ie, the network/links<br>
42 return -errno; component(s) have yet
to be created, hence the error<br>
<br>
<br>
<br>
systemd-networkd status, journalctl entries, and
/run/systemd/network files:<br>
---------------------------------------------------------------------------<br>
<br>
$ sudo systemctl -l status systemd-networkd<br>
systemd-networkd.service - Network Service<br>
Loaded: loaded (/lib/systemd/system/systemd-networkd.service;
enabled)<br>
Active: active (running) since Thu 2014-03-13 19:23:03 EDT;
1min 31s ago<br>
Docs: man:systemd-networkd.service(8)<br>
Main PID: 172 (systemd-network)<br>
Status: "Processing requests..."<br>
CGroup: /system.slice/systemd-networkd.service<br>
`-172 /lib/systemd/systemd-networkd<br>
<br>
Mar 13 19:23:03 b-movie systemd[1]: Starting Network Service...<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: Failed to save link
data /run/systemd/network/links/2: No such file or directory<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: enp2s2: link is up<br>
Mar 13 19:23:03 b-movie systemd[1]: Started Network Service.<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: enp2s2: carrier on<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: enp2s2: DHCPv4
address 192.168.0.100/24 via 192.168.0.1<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: enp2s2: link
configured<br>
<br>
$ sudo journalctl -xb | grep -iE 'enp2s2|dhcp|network'<br>
Mar 13 19:23:03 b-movie systemd[1]: Starting Network Service...<br>
Mar 13 19:23:03 b-movie avahi-daemon[169]: Network interface
enumeration completed.<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: Failed to save link
data /run/systemd/network/links/2: No such file or directory<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: enp2s2: link is up<br>
Mar 13 19:23:03 b-movie systemd[1]: Started Network Service.<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: enp2s2: carrier on<br>
Mar 13 19:23:03 b-movie systemd[1]: Starting Network.<br>
Mar 13 19:23:03 b-movie systemd[1]: Reached target Network.<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: enp2s2: DHCPv4
address 192.168.0.100/24 via 192.168.0.1<br>
Mar 13 19:23:03 b-movie systemd-networkd[172]: enp2s2: link
configured<br>
<br>
$ ls -lta /run/systemd/network/links<br>
total 4<br>
drwxr-xr-x 2 root root 60 Mar 13 19:11 .<br>
drwxr-xr-x 4 root root 100 Mar 13 19:11 ..<br>
-rw-r--r-- 1 root root 105 Mar 13 19:11 2<br>
<br>
$ ls -lta /run/systemd/network/leases<br>
total 4<br>
drwxr-xr-x 2 root root 60 Mar 13 19:11 .<br>
drwxr-xr-x 4 root root 100 Mar 13 19:11 ..<br>
-rw-r--r-- 1 root root 148 Mar 13 19:11 test.lease<br>
<br>
$ cat /run/systemd/network/leases/test.lease<br>
# This is private data. Do not parse.<br>
ADDRESS=192.168.0.100<br>
ROUTER=192.168.0.1<br>
NETMASK=255.255.255.0<br>
SERVER_ADDRESS=192.168.0.1<br>
NEXT_SERVER=0.0.0.0<br>
<br>
thanks much,<br>
John<br>
<br>
</font>
</body>
</html>