Description of problem:
In case of lot of interfaces getting up and down like in our hypervisor host /etc/NetworkManager/dispatcher.d/12-dhcpd dispatcher script cause dhcpd service deactivation. Systemd simply refuse to restart service due to often restart.
Oct 24 02:04:48 qe-dell-ovs5.dqe.lab.eng.bos.redhat.com systemd: dhcpd.service failed.
Oct 24 02:04:48 qe-dell-ovs5.dqe.lab.eng.bos.redhat.com systemd: start request repeated too quickly for dhcpd.service
Oct 24 02:04:48 qe-dell-ovs5.dqe.lab.eng.bos.redhat.com systemd: Failed to start DHCPv4 Server Daemon.
I believe the script can check which interface is going up and restart dhcpd only when the same interface is in ExecStart= in /etc/systemd/system/dhcpd.service. I believe have the config back in /etc/sysconfig/dhcpd would make it easier. But I believe /etc/sysconfig/dhcpd is obsolete in systemd, correct?
Version-Release number of selected component (if applicable):
Steps to Reproduce:
workarounded temporarily by commenting those two lines in mentioned script responsible for dhcp service restart
That looks like a bug in systemd if the limit on restarts leads to stopping the service instead of either restarting or failing right away.
That of course doesn't mean that the script shouldn't be improved. But we probably shouldn't ignore the behavior of systemd that looks entirely wrong to me.
In ideal case dhcpd should offer an reload action. You can also tweak StartLimitInterval=, StartLimitBurst= in the unit files.
In the worst case you can call
systemctl restart dhcpd.service; systemctl reset-failed dhcpd.service
from your script. reset-failed in this case will reset the counter.
Closing duplicate... I will move information from this bug to the older one.
*** This bug has been marked as a duplicate of bug 1302282 ***