[systemd-devel] Masking .network files
Leonid Isaev
lisaev at umail.iu.edu
Fri Apr 4 15:43:28 PDT 2014
Hi,
I seem to have a strange issue with the way networkd processes its
configuration files. The machine is actually a systemd-nspawn container with
a static IP address, so I had to mask the default 80-container-host0.network
and create a custom config. Both real and virtual machines are up-to-date
archlinux [testing] installations.
-----
$ file /{etc,usr/lib}/systemd/network/80-container-host0.network
/etc/systemd/network/80-container-host0.network: symbolic link to `/dev/null'
/usr/lib/systemd/network/80-container-host0.network: ASCII text
$ cat /etc/systemd/network/eth.network
[Match]
Name=host0
[Network]
Address=10.137.0.2/24
Gateway=10.137.0.1
[DHCPv4]
UseDNS=false
-----
However, this new .network file is never picked up by systemd-networkd (it
does provide a working network setup if the host0 interface is renamed). Here
is the debug output:
-----
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: timestamp of
'/etc/systemd/network' changed
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: timestamp of
'/run/systemd/network' changed
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: Skipping overridden
file: /usr/lib/systemd/network/80-container-host0.network.
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: Configuration
file /etc/systemd/network/80-container-host0.network is marked world-writable.
Please remove world writability permission bits. Proceeding anyway.
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: found matching
network '/etc/systemd/network/80-container-host0.network'
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: requesting link
status
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: bringing link up
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: link configured
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: link (with ifindex
22) added
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: lo: found matching network
'/etc/systemd/network/80-container-host0.network'
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: lo: requesting link status
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: lo: bringing link up
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: lo: link configured
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: lo: link (with ifindex 1)
added
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: MAC address:
36:9a:b1:98:ab:e1
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: link status
updated: 00000000 -> 0x00011043
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: link is up
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: host0: carrier on
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: Sent message
type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 error=n/a
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: Got message
type=method_return sender=org.freedesktop.DBus destination=:1.8 object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: lo: link status updated:
00000000 -> 0x00010049
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: lo: link is up
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: lo: carrier on
Apr 04 21:29:00 lxc_archtest systemd-networkd[128]: Got message type=signal
sender=org.freedesktop.DBus destination=:1.8 object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 error=n/a
Apr 04 21:29:02 lxc_archtest systemd-networkd[128]: Received SIGINT.
Apr 04 21:29:02 lxc_archtest systemd-networkd[128]: Assertion
's->event->state != SD_EVENT_FINISHED' failed at src/libsystemd/sd-event/sd-event.c:1308, function sd_event_source_set_enabled(). Ignoring.
Apr 04 21:29:02 lxc_archtest systemd-networkd[128]: Assertion
's->event->state != SD_EVENT_FINISHED' failed at src/libsystemd/sd-event/sd-event.c:1308, function sd_event_source_set_enabled(). Ignoring.
Apr 04 21:29:02 lxc_archtest systemd-networkd[128]: Assertion
's->event->state != SD_EVENT_FINISHED' failed at
src/libsystemd/sd-event/sd-event.c:1308, function sd_event_source_set_enabled(). Ignoring.
-----
I understand that the 1st matching configuration is applied but why does it
concern overriden files? Also, why does a symlink to /dev/null match all
interfaces (even loopback)?
Thanks,
--
Leonid Isaev
GnuPG key fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140404/0a6be5c8/attachment.sig>
More information about the systemd-devel
mailing list