You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the process of updating my system from Clear Linux 42050 to 42170. I experienced network configuration
issue. I have been using systemd-networkd.service and iptables for nearly 2 years now. But with this latest
update it is failing, iptables is not configuring any rules. I configured my desired ethernet
interface routing by using the files in /etc/systemd/network. I have NetworkManager.service turned off
I have looked into the problem and it seems that something has changed between Clear Linux build 42050 and
42170 that affects systemd boot timing, as a result network routing comes up broken.
I use systemd-netword.service to configure my network.
ls -l /etc/systemd/network/
total 12
-rw-r–r-- 1 root root 118 Sep 18 2022 10-dhcp.network
-rw-r–r-- 1 root root 756 Oct 8 2022 20-static.network
-rw-r–r-- 1 root root 576 Oct 8 2022 21-static.network
When systemd-netword.service was restarted manually below is the expected status.
● systemd-networkd.service - Network Configuration
Loaded: loaded (/etc/systemd/system/systemd-networkd.service; disabled; preset: disabled)
Active: active (running) since Wed 2024-08-21 08:51:45 PDT; 29min ago
TriggeredBy: ● systemd-networkd.socket
Docs: man:systemd-networkd.service(8)
man:org.freedesktop.network1(5)
Main PID: 3536 (systemd-network)
Status: "Processing requests..."
Tasks: 1 (limit: 38331)
FD Store: 0 (limit: 512)
Memory: 1.6M ()
CGroup: /system.slice/systemd-networkd.service
└─3536 /usr/lib/systemd/systemd-networkd
Aug 21 08:51:45 netserver03 systemd-networkd[3536]: enp5s0: Gained IPv6LL
Aug 21 08:51:45 netserver03 systemd-networkd[3536]: enp6s0: Gained IPv6LL
Aug 21 08:51:45 netserver03 systemd-networkd[3536]: Enumeration completed
Aug 21 08:51:45 netserver03 systemd[1]: Started systemd-networkd.service.
Aug 21 08:51:45 netserver03 systemd-networkd[3536]: enp9s0: Configuring with /etc/systemd/network/10-dhcp.network.
Aug 21 08:51:45 netserver03 systemd-networkd[3536]: enp5s0: Configuring with /etc/systemd/network/20-static.network.
Aug 21 08:51:45 netserver03 systemd-networkd[3536]: enp6s0: Configuring with /etc/systemd/network/21-static.network.
Aug 21 08:51:53 netserver03 systemd-networkd[3536]: enp9s0: DHCPv4 address xx.xxx.x.xxx/23, gateway xx.xx.x.1 acquired from xx.xxx.xxx.xx
Aug 21 08:51:54 netserver03 systemd-networkd[3536]: enp9s0: DHCPv6 address (Valid ipv6 address) (valid for 15h 34min 38s, preferred for 15h 34min 38s)
The networkd-systemd.service defines the conditions for restart if by my understanding, references systemd-networkd-wait-online.service, None of this seems to be working. I have have made changes to systemd-networkd-wait-online to define a valid state for my my network. If I test the unit systemd-networkd-wait-online these changes work by
itself. However the changes to systemd-networkd-wait-online did not work when rebooting from a
power cycle.
Here is the unit file definition for systemd-netword.service:
cat /etc/systemd/system/systemd-networkd.service
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Network Configuration
Documentation=man:systemd-networkd.service(8)
Documentation=man:org.freedesktop.network1(5)
ConditionCapability=CAP_NET_ADMIN
DefaultDependencies=no
# systemd-udevd.service can be dropped once tuntap is moved to netlink
After=systemd-networkd.socket systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
Before=network.target multi-user.target shutdown.target initrd-switch-root.target
Conflicts=shutdown.target initrd-switch-root.target
Wants=systemd-networkd.socket network.target
[Service]
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
BusName=org.freedesktop.network1
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
DeviceAllow=char-* rw
ExecStart=!!/usr/lib/systemd/systemd-networkd
FileDescriptorStoreMax=512
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
ProtectProc=invisible
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectSystem=strict
Restart=on-failure
RestartKillSignal=SIGUSR2
RestartSec=0
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
RuntimeDirectory=systemd/netif
RuntimeDirectoryPreserve=yes
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
Type=notify-reload
User=systemd-network
WatchdogSec=3min
[Install]
WantedBy=multi-user.target
Also=systemd-networkd.socket
Alias=dbus-org.freedesktop.network1.service
# The output from this generator is used by udevd and networkd. Enable it by
# default when enabling systemd-networkd.service.
Also=systemd-network-generator.service
# We want to enable systemd-networkd-wait-online.service whenever this service
# is enabled. systemd-networkd-wait-online.service has
# WantedBy=network-online.target, so enabling it only has an effect if
# network-online.target itself is enabled or pulled in by some other unit.
Also=systemd-networkd-wait-online.service
Other details my server hardware and relevant software versions:
Note this issue appears to have been fixed at Clear Linux build 42410. I update ever one to 2 week intervals so I cannot be sure what exact build number fixed the issue. All I can report is that behavior is more expected, The changes to
systemd-networkd-wait-online.service work as expected. The effect can be seen with system-analyze command as shown
systemd-analyze plot >bootup.svg. bootup.svg can be viewed with eog or firefox. The timeline of the bootup can
be observed.
[Unit]
Description=Wait for Network to be Configured
Documentation=man:systemd-networkd-wait-online.service(8)
ConditionCapability=CAP_NET_ADMIN
DefaultDependencies=no
Conflicts=shutdown.target
BindsTo=systemd-networkd.service
After=systemd-networkd.service
Before=network-online.target shutdown.target
[Service]
Type=oneshot
#ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --interface=enp5s0 --interface=enp6s0 --interface=enp9s0 --ipv4
RemainAfterExit=yes
[Install] WantedBy=network-online.target
Below are the status of iptables and systemd-networkd-wait-online.service are shown:
systemctl status systemd-networkd-wait-online.service
● systemd-networkd-wait-online.service - Wait for Network to be Configured
Loaded: loaded (/etc/systemd/system/systemd-networkd-wait-online.service; enabled; preset: disabled)
Active: active (exited) since Fri 2024-09-27 15:50:19 PDT; 2h 10min ago
Docs: man:systemd-networkd-wait-online.service(8)
Main PID: 815 (code=exited, status=0/SUCCESS)
Sep 27 15:50:13 netserver03 systemd[1]: Starting systemd-networkd-wait-online.service...
Sep 27 15:50:19 netserver03 systemd[1]: Finished systemd-networkd-wait-online.service.
systemctl status iptables-restore.service
● iptables-restore.service - Restore IPv4 firewall settings across reboots
Loaded: loaded (/etc/systemd/system/iptables-restore.service; enabled; preset: disabled)
Active: active (exited) since Fri 2024-09-27 15:50:13 PDT; 2h 10min ago
Main PID: 677 (code=exited, status=0/SUCCESS)
Sep 27 15:50:13 netserver03 systemd[1]: Starting iptables-restore.service...
Sep 27 15:50:13 netserver03 systemd[1]: Finished iptables-restore.service.
In the process of updating my system from Clear Linux 42050 to 42170. I experienced network configuration
issue. I have been using systemd-networkd.service and iptables for nearly 2 years now. But with this latest
update it is failing, iptables is not configuring any rules. I configured my desired ethernet
interface routing by using the files in /etc/systemd/network. I have NetworkManager.service turned off
I have looked into the problem and it seems that something has changed between Clear Linux build 42050 and
42170 that affects systemd boot timing, as a result network routing comes up broken.
I use systemd-netword.service to configure my network.
I configure iptable with the file:
When the system boots this what the status of systemd-networkd.service shows:
Failed systed-networkd-wait-online.service it did not run
The only way to fix the network routing is to run an alias I created after the server has
booted in a terminal shell.
When systemd-netword.service was restarted manually below is the expected status.
The networkd-systemd.service defines the conditions for restart if by my understanding, references systemd-networkd-wait-online.service, None of this seems to be working. I have have made changes to systemd-networkd-wait-online to define a valid state for my my network. If I test the unit systemd-networkd-wait-online these changes work by
itself. However the changes to systemd-networkd-wait-online did not work when rebooting from a
power cycle.
Here is the unit file definition for systemd-netword.service:
Other details my server hardware and relevant software versions:
The text was updated successfully, but these errors were encountered: