Bug 1387995

Summary: dispatcher script cause dhcpd deactivation
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Pelka <tpelka>
Component: dhcpAssignee: Pavel Šimerda (pavlix) <psimerda>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: lnykryn, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-01 16:27:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1380362    

Description Tomas Pelka 2016-10-24 07:20:54 UTC
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[1]: dhcpd.service failed.
Oct 24 02:04:48 qe-dell-ovs5.dqe.lab.eng.bos.redhat.com systemd[1]: start request repeated too quickly for dhcpd.service
Oct 24 02:04:48 qe-dell-ovs5.dqe.lab.eng.bos.redhat.com systemd[1]: 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):
dhcp-4.2.5-47.el7

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
workarounded temporarily by commenting those two lines in mentioned script responsible for dhcp service restart

Comment 1 Pavel Šimerda (pavlix) 2016-11-01 14:18:30 UTC
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.

Comment 3 Lukáš Nykrýn 2016-11-01 14:48:22 UTC
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.

Comment 4 Pavel Šimerda (pavlix) 2016-11-01 16:27:42 UTC
Closing duplicate... I will move information from this bug to the older one.

*** This bug has been marked as a duplicate of bug 1302282 ***