Bug#882504: gnome-shell: apt-helper wait-online bypasses well-known mechanism to wait for the network to be 'online'
Julian Andres Klode
jak at debian.org
Thu Nov 23 21:04:42 UTC 2017
Control: reassign -1 apt 1.5~rc2
On Thu, Nov 23, 2017 at 02:26:24PM +0000, Sam Morris wrote:
> Package: gnome-shell
> Version: 3.26.2-1
> Severity: normal
>
> apt-daily doesn't work on my system.
>
> Nov 23 13:53:04 systemd[1]: Starting Daily apt download activities...
> Nov 23 13:53:34 systemd-networkd-wait-online[13512]: Event loop failed: Connection timed out
> Nov 23 13:53:34 apt-helper[13510]: E: Sub-process /lib/systemd/systemd-networkd-wait-online returned an error code (1)
> Nov 23 13:53:34 systemd[1]: apt-daily.service: Control process exited, code=exited status=100
> Nov 23 13:53:34 systemd[1]: apt-daily.service: Failed with result 'exit-code'.
> Nov 23 13:53:34 systemd[1]: Failed to start Daily apt download activities.
> Nov 23 13:53:34 systemd[1]: apt-daily.service: Consumed 59ms CPU time
>
> I notice that apt-helper.cc has a hard-coded list of network management
> services services which, if running, will be waited on by running a
> service-specific command. Rather than such a cardcoded list, apt could
> make use of the network-online.target, which is the well-known
> integration point provided by systemd for clients to wait for the
> network to be 'online'.
>
> This is documented at
> <https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/>. You
> basically unconditionally wait on network-online.target, and then you
> don't need to worry about which of systemd-networkd, NetworkManager,
> connman, ifupdown, netscript, etc., are actually pulled in to satisfy
> the dependency
This unfortunately does not work at resume or when the timer elapses
because the target remains active after the services have exited: In
systemd's world, once your system is online it stays online (and I guess
if it does not get online during boot, it stays offline? No idea.).
> On my system I use NetworkManager for the ethernet and wireless
> interfaces, and systemd-networkd for virtual interfaces used for
> tunneling and bridging. In this case, the systemd-networkd-wait-online
> command will always time out.
>
> From this users' point of view, I have already disabled
> systemd-networkd-wait-online.service in order to configure the system to
> ignore systemd-networkd when considering if the network is 'online'. So
> it would be handy if apt would make use of network-online.target instead
> of doing its own thing here.
right, instead of checking the services of the network managers in question,
we could just check if their online wait helper services are disabled, I guess.
--
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer i speak de, en
More information about the pkg-gnome-maintainers
mailing list