ddclient installations breaks dhclient hooks

Bug #1662314 reported by Marco Bicca
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ddclient (Debian)
Fix Released
Unknown
ddclient (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

It seems that this is a variation of this same bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807707

Deployed a new Ubuntu 16.04 LTS image on Microsoft Azure:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

Kernel:
4.4.0-62-generic

Installed ddclient:
3.8.2-2ubuntu2

After ddclient is installed and running, you can see its exit-hook script under /etc/dhcp/dhclient-exit-hooks.d

#!/bin/sh
# /etc/dhcp/dhclient-exit-hooks.d/ddclient - exit hook for dhclient

[ -x /usr/sbin/ddclient ] || exit 0
[ -f /etc/default/ddclient ] || exit 0
. /etc/default/ddclient
[ $run_dhclient = "true" ] || exit 0

case $reason in
    BOUND | RENEW | REBIND)
        /usr/bin/logger -t dhclient $reason, updating IP address with ddclient
        /usr/sbin/ddclient -daemon=0 -syslog > /dev/null 2>&1
        ;;
    *)
        ;;
esac

If you reboot , the VM won't come back again with issues getting route/gateway info from DHCP server.

It seems like, changing the script to the one below, fixes the issue:

#!/bin/sh
# /etc/dhcp/dhclient-exit-hooks.d/ddclient - exit hook for dhclient

[ -x /usr/sbin/ddclient ] || return
[ -f /etc/default/ddclient ] || return
. /etc/default/ddclient
[ $run_dhclient = "true" ] || return

case $reason in
    BOUND | RENEW | REBIND)
        /usr/bin/logger -t dhclient $reason, updating IP address with ddclient
        /usr/sbin/ddclient -daemon=0 -syslog > /dev/null 2>&1
        ;;
    *)
        ;;
esac

Somehow the reported version on Debian to have a fix is 3.8.2-2 (which is the same) but maybe the patch didn't get through?

Thank you!

Revision history for this message
Jon Schewe (jpschewe) wrote :

I've seen the same problem on my system. Calling exit from a dhclient hook causes dhclient to stop processing the other hooks in the directory.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ddclient (Ubuntu):
status: New → Confirmed
Richard Hansen (rhansen)
Changed in ddclient (Ubuntu):
status: Confirmed → Fix Released
summary: - ddclient installations brakes dhclient hooks
+ ddclient installations breaks dhclient hooks
Changed in ddclient (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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