[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1006604: debian-edu-config: Debian Edu clients without GOsa system entry loose IP address after 30min

Package: debian-edu-config
Severity: important
Version: 2.12.17
Control: found -1 2.11.56+deb11u3

Hi all,

another debug session with a customer revealed a problem in the update-hostname-from-ip script that gets called via ifup as post-up hook script. The script fails with non-zero exitcode at various places, esp. near the very end of the script: if no hostname could be found, this is interpreted as failure and the script exits with exit code 1.

If the site admin has not added a system entry for a given Debian Edu client host in GOsa², the host will retrieve an IP address, but then fail in update-hostname-from-ip.

From ifupdown's perspective this is an overall ifup failure and ifup will kill the related dhclient process of the device that we tried to ifup... The IPv4 lease will then expire after 30min and will not get renewed.

There are two solutions at hand for this:

(1) /etc/network/interfaces

ifup eth0 inet dhcp
    post-up /usr/sbin/update-hostname-from-ip || true
    post-up /usr/share/debian-edu-config/tools/update-proxy-from-wpad

Note the "|| true" at the end of the first post-up line.

Advantage: update-hostname-from-ip can continue to fail, if the hostname update was unsuccessful. This would be an honest behaviour.

Disadvantage: we need to tweak this with cfengine3 and all hosts will require a cf-agent run after having upgraded to a fixed d-e-c version. This is definitely suboptimal for a Debian Edu bullseye point release d-e-c pkg upgrade.

(2) in /usr/sbin/update-hostname-from-ip

We could also adjust exit codes of /usr/sbin/update-hostname-from-ip in a way, so that it always exits with exitcode 0. This will make ifupdown happy and not config change in /etc/network/interfaces is required.

(3) mixed approach...

We could use approach (1) for the Debian Edu 12 development branch and use approach (2) for the Debian Edu bullseye update branch...

Comments, opinions?



c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

Attachment: pgpf9sFjgcbHM.pgp
Description: Digitale PGP-Signatur

Reply to: