Bug#882504: Problem still exists
On 17-11-2020 11:20, Julian Andres Klode wrote:
> On Tue, Nov 17, 2020 at 10:58:47AM +0100, Kees Bakker wrote:
>> Hi,
>>
>> On my systems I have two ethernet devices, only one is connected.
>> And thus I have excluded one in the systemd configuration, as you can
>> see below.
>>
>> This is mainly to avoid the needless timeout during boot up.
>>
>> apt-helper however is ignoring this configuration and it is causing
>> unnecessary errors in my syslog.
>>
>> Nov 16 04:30:24 luts systemd[1]: Starting Daily apt download activities...
>> Nov 16 04:30:54 luts systemd-networkd-wait-online[993706]: Event loop
>> failed: Connection timed out
>> Nov 16 04:30:54 luts apt-helper[993698]: E: Sub-process
>> /lib/systemd/systemd-networkd-wait-online returned an error code (1)
>>
>> apt-helper is simply running /lib/systemd/systemd-networkd-wait-online
>> directly
>> without looking at the systemd configuration.
>>
>> I'm not familiar enough with systemctl to know whether there is a better
>> alternative.
>> Perhaps: systemctl -q is-active systemd-networkd-wait-online
> There is no better alternative. The service runs once at boot, but
> we need to check for network connectivity at resume too. And we're
> not going to parse systemd units to figure out what you did to
> them.
>
> I don't think that the systemd interface of --ignore is correct
> here, the configuration which networks should be considered relevant
> for online-ness should be stored in the .network files. In fact,
> there's even an option already for that:
>
> RequiredForOnline=no
>
OK, that good be the right solution.
I've created a file /etc/systemd/network/99-eno2.network
[Match]
Name=eno2
[Link]
RequiredForOnline=no
But I don't understand how to make this effective.
Running "networkctl reload" does not seem to read the .network files.
Oh, and netplan may also play a role. I have this:
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
dhcp6: no
addresses:
...
eno2:
dhcp4: no
dhcp6: no
I'm guessing I have to remove the eno2 part and try again. (( But this
is a remote system, so I have to be careful not to loose the network
connection. ))
--
Kees Bakker
Reply to: