systemd dhclient hook is causing md5sum cmds in inexistent files

Bug #1832053 reported by Rafael David Tinoco
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
In Progress
Undecided
Unassigned
Eoan
In Progress
Undecided
Unassigned

Bug Description

I have discovered this issue by doing investigation for the BUG:

https://bugs.launchpad.net/ubuntu/+bug/1832050

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

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

I believe commit

+systemd (240-6ubuntu9) eoan; urgency=medium

caused this issue with a patch to file "debian/extra/dhclient-enter-resolved-hook"

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

Related case:

chrony autopkgtest "time-sources-from-dhcp-servers" fails (produces stderr)
https://bugs.launchpad.net/ubuntu/+bug/1832050

no longer affects: Ubuntu Eoan
Changed in chrony (Ubuntu Eoan):
status: New → In Progress
Changed in systemd (Ubuntu Eoan):
status: New → In Progress
no longer affects: ubuntu
no longer affects: chrony (Ubuntu)
no longer affects: chrony (Ubuntu Eoan)
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.