Package: isc-dhcp-client Version: 4.4.3-P1-1.1 Followup-For: Bug #932769 Hi,
We experience this issue too, in Bullseye and Bookworm (updated from Bullseye). Our environment is similar to that described by Mark (the initial reporter), i.e., a VMware ESXi cluster with VMs stored on a network storage. In our case, if the network storage becomes full, VMs get disk IO errors and mark file systems as read-only. After that, the DHCP client starts requesting and declining IP addresses in a rapid manner. Leased addresses stay configured on the VMs' network interfaces, which leads to DHCP pool exhaustion. What happens in details: - The DHCP client requests and receives an IP address. - It runs the script /sbin/dhclient-script. - The script configures a network interface. - Next the script updates the /etc/resolv.conf file. For this, it calls the wait_for_rw function to check if it can write to /etc/resolv.conf.<shell PID>. - If a file system is read only this check doesn't work as expected. The script fails and exits with a non-zero code once it hits the following line in wait_for_rw(): while ! { : >> "$file"; } 2>/dev/null; - So the script exits, but the network interface still has leased IP address. - When DHCP client gets a non-zero code from the script, it sends DHCPDECLINE to a DHCP server. - The DHCP server abandons the IP address. It might try to reuse it later by performing a ping check but the misbehaving DHCP client will respond to it. The script is executed by Dash (being /bin/sh) and its behavior complies with POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_01, "Redirection error with special built-in utilities" - "shall exit" for non-interactive shells. The error doesn't occur if the script executed by Bash. Currently we test a simple Bash wrapper script as a workaround: #!/bin/bash source /sbin/dhclient-script The problem can be reproduced by issuing "echo 1 > /sys/block/sda/device/delete" on a test machine to remove the disk (sda here) from the kernel. -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.1.0-3-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages isc-dhcp-client depends on: ii debianutils 5.7-0.4 ii iproute2 6.1.0-1 ii libc6 2.36-8 Versions of packages isc-dhcp-client recommends: ii isc-dhcp-common 4.4.3-P1-1.1 Versions of packages isc-dhcp-client suggests: pn avahi-autoipd <none> pn isc-dhcp-client-ddns <none> pn resolvconf <none> -- no debconf information