Bug#882504: gnome-shell: apt-helper wait-online bypasses well-known mechanism to wait for the network to be 'online'

2017-11-23 Thread Julian Andres Klode
Control: reassign -1 apt 1.5~rc2

On Thu, Nov 23, 2017 at 02:26:24PM +, 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
> . 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



Bug#882504: gnome-shell: apt-helper wait-online bypasses well-known mechanism to wait for the network to be 'online'

2017-11-23 Thread Michael Biebl
Am 23.11.2017 um 15:26 schrieb Sam Morris:
> 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'.

The problem is, that network-online.target is a boot-time
synchronization point, whereas apt needs this for suspend/resume as
well, i.e. during runtime.

This is not what network-online.target was designed for.

See also https://github.com/systemd/systemd/pull/7345

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#882504: gnome-shell: apt-helper wait-online bypasses well-known mechanism to wait for the network to be 'online'

2017-11-23 Thread Michael Biebl
Am 23.11.2017 um 15:26 schrieb Sam Morris:
> Package: gnome-shell

Wrong package ?

> 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
> . 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.
> 
> 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.



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Bug#882504: gnome-shell: apt-helper wait-online bypasses well-known mechanism to wait for the network to be 'online'

2017-11-23 Thread Sam Morris
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
. 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.

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.

Thanks!

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (570, 'testing-debug'), (570, 'testing'), (540, 
'unstable-debug'), (540, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.13.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gnome-shell depends on:
ii  caribou  0.4.21-2
ii  dconf-gsettings-backend [gsettings-backend]  0.26.1-1
ii  evolution-data-server3.26.2.1-1
ii  gir1.2-accountsservice-1.0   0.6.45-1
ii  gir1.2-atspi-2.0 2.26.0-2
ii  gir1.2-caribou-1.0   0.4.21-2
ii  gir1.2-freedesktop   1.54.1-3
ii  gir1.2-gcr-3 3.20.0-5.1
ii  gir1.2-gdesktopenums-3.0 3.24.1-1
ii  gir1.2-gdm-1.0   3.26.2.1-2
ii  gir1.2-geoclue-2.0   2.4.7-1
ii  gir1.2-glib-2.0  1.54.1-3
ii  gir1.2-gnomebluetooth-1.03.26.1-1
ii  gir1.2-gnomedesktop-3.0  3.26.2-1
ii  gir1.2-gtk-3.0   3.22.24-3
ii  gir1.2-gweather-3.0  3.26.0-1
ii  gir1.2-ibus-1.0  1.5.14-3
ii  gir1.2-mutter-1  3.26.2-1
ii  gir1.2-networkmanager-1.01.10.0-1
ii  gir1.2-nmgtk-1.0 1.8.6-1
ii  gir1.2-pango-1.0 1.40.12-1
ii  gir1.2-polkit-1.00.105-18
ii  gir1.2-rsvg-2.0  2.40.18-2
ii  gir1.2-soup-2.4  2.60.2-1
ii  gir1.2-upowerglib-1.00.99.6-1
ii  gjs  1.50.2-1
ii  gnome-backgrounds3.26.2-1
ii  gnome-settings-daemon3.26.2-1
ii  gnome-shell-common   3.26.2-1
ii  gsettings-desktop-schemas3.24.1-1
ii  libasound2   1.1.3-5
ii  libatk-bridge2.0-0   2.26.0-1
ii  libatk1.0-0  2.26.0-2
ii  libc62.24-17
ii  libcairo21.15.8-2
ii  libcanberra-gtk3-0   0.30-4
ii  libcanberra0 0.30-4
ii  libcroco30.6.12-1
ii  libdbus-glib-1-2 0.108-3
ii  libecal-1.2-19   3.26.2.1-1
ii  libedataserver-1.2-223.26.2.1-1
ii  libgcr-base-3-1  3.20.0-5.1
ii  libgdk-pixbuf2.0-0   2.36.11-1
ii  libgirepository-1.0-11.54.1-3
ii  libgjs0g