Hi Axel!
On Mo, 09 Sep 2019, Axel Beckert wrote:
> Package: xymon-client
> Version: 4.3.28-2
> Severity: important
> Tag: moreinfo
> Control: found -1 4.3.28-2+deb9u1
> Control: found -1 4.3.28-5+deb10u1
> Control: found -1 4.3.30-1
> With the recent security updates, but also in Debian Unstable I noticed
> that some installations did no more report to the correct server or the
> same list of servers anymore.
> All those had one or more older server IPs in the debconf database and a
> different set in /etc/default/xymon-client, either manually edited or
> via config management like ansible.
> xymon-client.postinst edits two variables in /etc/default/xymon-client
> unconditionally and always sets the IP address(es) stored in the debconf
> database.
I also observed this on some servers.
Today I had a deep dive into all the debconf and postinst scripts of
xymon-client and found the root cause in xymon-client.config:
if [ -e $CONFIGFILE ]; then
. $CONFIGFILE || true
fi
# if there is no value configured, look for debconf answers
if [ -z "$HOBBITSERVERS" ] ; then
db_get hobbit-client/HOBBITSERVERS
HOBBITSERVERS="$RET"
fi
This reads HOBBITSERVERS from /etc/default/xymon, but this isn't set
(since it was overwritten by XYMONSERVERS some time ago).
Since now the current setting XYMONSERVERS isn't found in
/etc/default/xymon (because it searches for HOBBITSERVERS, that isn't
set), it takes the (old) default from debconf database and breaks
/etc/default/xymon.
I'm working on a new Debian release of xymon, that removes all the pre
4.3.7 hobbit to xymon migration logic (available since Debian 8, so it
can not be removed) and also rename these hobbit-client and
HOBBITSERVERS debconf fields to xymon-client and XYMONSERVERS (with a
fallback to the old variables, if the new ones are not found).
Greetings
Roland