Bug#951486: network-manager: network-online.target returns before network has IP address

2020-02-17 Thread Henrik Schmidt
Package: network-manager
Version: 1.22.6-1
Severity: important

Dear Maintainer,

I want to use autofs with LDAP. I'm using DHCP and network-manager.
 
network-online.target will return before a valid IP address is provided and 
therefore
autofs.service is invoked too early, failing to bind to the LDAP server.

network-online.target.wants is using NetworkManager-wait-online.service which 
is the source of the problem.
It is using 'ExecStart=/usr/bin/nm-online -s -q --timeout=30' and only if I 
remove the '-s' parameter,
it is properly waiting for DHCP to negotiate an IP address and autofs can bind 
afterwar7

systemd-analyze blame shows that NetworkManager-wait-online.service is taking 7 
secs with '-s'
and 22 secs without '-s'. 

-- System Information:
Debian Release: 10.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages network-manager depends on:
ii  adduser3.118
ii  dbus   1.12.16-1
ii  init-system-helpers1.56+nmu1
ii  libaudit1  1:2.8.4-3
ii  libbluetooth3  5.50-1
ii  libc6  2.28-10
ii  libcurl3-gnutls7.64.0-4
ii  libglib2.0-0   2.58.3-2+deb10u2
ii  libgnutls303.6.7-4+deb10u2
ii  libjansson42.12-1
ii  libmm-glib01.10.0-1
ii  libndp01.6-1+b1
ii  libnewt0.520.52.21-4
ii  libnm0 1.22.6-1
ii  libpam-systemd 241-7~deb10u3
ii  libpolkit-agent-1-00.105-25
ii  libpolkit-gobject-1-0  0.105-25
ii  libpsl50.20.2-2
ii  libreadline8   8.0-3
ii  libselinux12.8-1+b1
ii  libsystemd0241-7~deb10u3
ii  libteamdctl0   1.28-1
ii  libudev1   241-7~deb10u3
ii  libuuid1   2.33.1-0.1
ii  policykit-10.105-25
ii  udev   241-7~deb10u3
ii  wpasupplicant  2:2.7+git20190128+0c1e29f-6+deb10u1

Versions of packages network-manager recommends:
ii  crda 3.18-1
ii  dnsmasq-base [dnsmasq-base]  2.80-1
ii  iptables 1.8.2-4
ii  modemmanager 1.10.0-1
ii  ppp  2.4.7-2+4.1

Versions of packages network-manager suggests:
ii  isc-dhcp-client  4.4.1-2
pn  libteam-utils

-- no debconf information



Bug#951320: closed by Michael Biebl (Re: Bug#951320: systemd: network-online.target exits too early -> autofs with ldap fails)

2020-02-14 Thread Henrik Schmidt
Debian Bug Tracking System schrieb am 14.02.20 um 13:45:
> This is an automatic notification regarding your Bug report
> which was filed against the systemd package:
>
> #951320: systemd: network-online.target exits too early -> autofs with ldap 
> fails
>
> It has been closed by Michael Biebl .
>
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Michael Biebl 
>  by
> replying to this email.
>
>
Hi,

since this seems to be a debain bug where to I report it to get a better
answer than an immediate bug report closure?

Best

Henrik Schmidt



Bug#842199: autofs should pull in network-online.target and nfs-client.target and related issues

2019-05-09 Thread Henrik Schmidt
Hi,

the proposed fix does not solve the problem here, using LDAP for
automount in nsswitch.conf .

automout: bind_ldap_simple: lookup(ldap): Unable to bind to the LDAP
server: (default), error Can't contact LDAP server.

If I add ExecStartPre=/bin/sleep 20 in autofs.service it works as
expected, so there is still a timing problem.

Henrik

On Thu, 14 Mar 2019 18:33:51 +0100 Mike Gabriel
 wrote:
> Hi Daniel,
>
> I am currently adopting the orphaned autofs package. The issue you
> reported here as something that we have been observing in Debian Edu
> deployments for years. Thanks for proposing a fix.
>
> On Wed, 26 Oct 2016 13:28:01 -0700 Daniel Lakeland
>  wrote:
> >
> > Package: autofs
> > Version: 5.1.1-1
> > Severity: important
> > Tags: patch
> >
> > Dear Maintainer,
> >
> > *** Reporter, please consider answering these questions, where
> > appropriate ***
> >
> > * What led up to the situation?
> >
> > Boot machine that has autofs configured to mount directories under
> > /home/ via nfs4.
> > The machine comes up but directories don't get mounted.
> >
> > For this to work properly we need several things to happen:
> >
> > 1) rpc.idmapd and rpc.gssd need to run
> > 2) autofs needs to start up after the network is online
> >
> > Add the following line to autofs.system
> > Requires=network-online.target nfs-client.target
> >
> > Add the following line to nfs-client.target
> > Requires=nfs-idmapd.service rpc-gssd.service
> >
> > After these changes, autofs starts up late enough that the network is
> > online, and
> > when it tries to mount nfs4 mounts it works
>
> However, I suspect that we cannot entangle autofs and NFS as much as you
> propose here. Note that people also may use autofs for local device
> mounting and don't run NFS with it at all.
>
> So, for the autofs side of things, I propose this (a Wants= solution
> rather than a Requires= solution):
>
> ```
> commit 9e1569ac32e53a6b364241fe68377579ffcbd5db (HEAD -> master)
> Author: Mike Gabriel 
> Date:   Thu Mar 14 15:04:46 2019 +0100
>
>     debian/autofs.service: Add nfs-client.target to Wants= key.
> Hopefully, this is sufficient to fix #842199, if not, please reopen the
> bug. (Closes: #842199).
>
> diff --git a/debian/autofs.service b/debian/autofs.service
> index 8d7afa2..33a3d4e 100644
> --- a/debian/autofs.service
> +++ b/debian/autofs.service