chrony autopkgtest "time-sources-from-dhcp-servers" fails (produces stderr)

Bug #1832050 reported by Rafael David Tinoco
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Confirmed
Undecided
Dimitri John Ledkov
Eoan
Confirmed
Undecided
Dimitri John Ledkov

Bug Description

iproute2 fix in -proposed (https://launchpad.net/ubuntu/+source/iproute2/4.18.0-1ubuntu3) has showed regressions in chrony autopkgtest (object of this bug report).

From autopkgtest output:

"""
Generating /etc/default/isc-dhcp-server...
Created symlink /etc/systemd/system/multi-user.target.wants/isc-dhcp-server.service → /lib/systemd/system/isc-dhcp-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/isc-dhcp-server6.service → /lib/systemd/system/isc-dhcp-server6.service.
Setting up autopkgtest-satdep (0) ...
Processing triggers for systemd (240-6ubuntu9) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.29-0ubuntu2) ...
(Reading database ... 62774 files and directories currently installed.)
Removing autopkgtest-satdep (0) ...
autopkgtest [20:50:33]: test time-sources-from-dhcp-servers: [-----------------------
Preparing the dummy network interface and dhcpd configuration…
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v4-dummy0.conf: No such file or directory
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v6-dummy0.conf: No such file or directory
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v4-dummy0.conf: No such file or directory
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v6-dummy0.conf: No such file or directory
Done!

Check if the NTP server is made available to chronyd…
SUCCESS!

Release the current lease and check if the NTP server has been correctly removed…
SUCCESS!
"""

It is likely that the stdout from md5sum coming out of the dhclient command caused the "regression".

I have reproduced the issue by hand doing:

$ apt-get install isc-dhcp-server
$ modprobe dummy

$ ip link add name dummy0 type dummy
$ ip address add 192.168.1.1/24 dev dummy0
$ ip link set dev dummy0 up

cat <<EOF > /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
authorative;

subnet 192.168.1.0 netmask 255.255.255.0 {
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.1.255;
    option ntp-servers 192.168.1.50;
    range 192.168.1.42 192.168.1.100;
}
EOF

$ sed -i 's/INTERFACESv4=""/INTERFACESv4="dummy0"/' /etc/default/isc-dhcp-server

and

$ systemctl restart isc-dhcp-server

$ dhclient dummy0 <- problem happens here

It could be a "isc-dhcp-client"problem, but I'll keep this bug linked to another bug if that is the case.

Changed in ubuntu:
assignee: nobody → Rafael David Tinoco (rafaeldtinoco)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

When trying a simple dhclient running on a bridge called "teste":

(c)inaddy@eoanchrony:~/work/sources/ubuntu/chrony/debian/tests$ sudo dhclient teste
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v4-teste.conf: No such file or directory
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v6-teste.conf: No such file or directory
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v4-teste.conf: No such file or directory
md5sum: /run/systemd/resolved.conf.d/isc-dhcp-v6-teste.conf: No such file or directory

The problem is caused by the hook script:

/etc/dhcp/dhclient-enter-hooks.d/resolved

In the following line:

md5sum $statedir/isc-dhcp-v4-$interface.conf $statedir/isc-dhcp-v6-$interface.conf &> $oldstate

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

@xnox,

remember that issue on systemd with:

b/debian/extra/dhclient-enter-resolved-hook

I think the following systemd patch:

+systemd (240-6ubuntu9) eoan; urgency=medium
+
+ * Fix typpo in storage test.
+ File: debian/tests/storage
+ https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=f28aa5fe4ab175b99b6ea702559c59ca473b4ca
8
+
+ * Fix bashism
+ File: debian/extra/dhclient-enter-resolved-hook
+ https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=0725c1169ddde4f41cacba7af3e546704e2206b
e
+
+ -- Dimitri John Ledkov <email address hidden> Thu, 30 May 2019 21:45:50 +0100

Caused the issue above ^ (with the md5sum line). I'm opening a systemd bug for that.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Related case:

systemd dhclient hook is causing md5sum cmds in inexistent files
https://bugs.launchpad.net/ubuntu/+bug/1832053

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

argh! yes, must fix.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

There also another chrony regression being investigated here:

https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1836929

no longer affects: ubuntu
no longer affects: Ubuntu Eoan
Changed in systemd (Ubuntu Eoan):
status: New → Confirmed
Changed in chrony (Ubuntu Eoan):
status: New → Confirmed
assignee: nobody → Dimitri John Ledkov (xnox)
assignee: Dimitri John Ledkov (xnox) → nobody
Changed in systemd (Ubuntu Eoan):
assignee: nobody → Dimitri John Ledkov (xnox)
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Dimitri,

We fixed chrony's autopkgtest issue by allowing stderr during the test. This case is still "on" as the dhclient hooks were the ones causing stderr to chrony's tests (fyio). I have marked LP: #1832053 as a duplicate of this and marked affecting systemd only.

Thanks!

no longer affects: chrony (Ubuntu)
no longer affects: chrony (Ubuntu Eoan)
Changed in systemd (Ubuntu Eoan):
status: Confirmed → Fix Released
status: Fix Released → Confirmed
tags: added: id-5d8a536c3eb49122f14145aa
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.