[systemd-devel] Bouncing interface once chrony is synced

Ian Pilcher arequipeno at gmail.com
Mon Jul 10 15:54:39 UTC 2017


On 07/10/2017 03:43 AM, Lennart Poettering wrote:
> If your DHCP client implementation gets confused by the wallclock not
> being steady then this appears to be a bug in the
> implementation. Given that there are so many DHCP clients to choose
> from, maybe use a different one?

Oh, it's definitely a bug in ISC dhclient:

   https://bugzilla.redhat.com/show_bug.cgi?id=1093803

Switching DHCP clients doesn't exactly sound like a trivial exercise,
however, since it would need to be integrated into the CentOS network
startup scripts; bouncing the interface (inelegant as it is) seems like
the easier option.

This unit file seems to be doing the job for IPv6 (since *something*
seems to be already doing this for IPv4):

   [Unit]
   Description=IPv6 DHCP client for %I
   Requires=chrony-wait.service
   After=chrony-wait.service

   [Service]
   Type=simple
   ExecStartPre=/usr/sbin/dhclient -6 -d -q -x -lf 
/var/lib/dhclient/dhclient6--%I.lease -pf /var/run/dhclient6-%I.pid %I
   ExecStart=/usr/sbin/dhclient -6 -d -q -1 -lf 
/var/lib/dhclient/dhclient6--%I.lease -pf /var/run/dhclient6-%I.pid %I

   [Install]
   WantedBy=multi-user.target

Maybe systemd-networkd ...

-- 
========================================================================
Ian Pilcher                                         arequipeno at gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================


More information about the systemd-devel mailing list