Bug 1387995 - dispatcher script cause dhcpd deactivation
Summary: dispatcher script cause dhcpd deactivation
Status: CLOSED DUPLICATE of bug 1302282
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dhcp
Version: 7.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: Release Test Team
Depends On:
Blocks: 1380362
TreeView+ depends on / blocked
Reported: 2016-10-24 07:20 UTC by Tomas Pelka
Modified: 2016-11-01 16:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-11-01 16:27:42 UTC
Target Upstream Version:

Attachments (Terms of Use)

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):

How reproducible:

Steps to Reproduce:

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 ***

Note You need to log in before you can comment on or make changes to this bug.