Bug 491868
| Summary: | service dhcpd reload silently fails | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Carsten Clasohm <clasohm> |
| Component: | dhcp | Assignee: | David Cantrell <dcantrell> |
| Status: | CLOSED ERRATA | QA Contact: | Alexander Todorov <atodorov> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 5.3 | CC: | atodorov, borgan |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-09-02 10:13:18 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Carsten Clasohm
2009-03-24 13:55:08 UTC
'reload' is not supported by dhcpd. You have to stop the service and start it again, or use 'restart'. Status code 3 means the feature you tried is unimplemented: http://intranet.corp.redhat.com/ic/intranet/InitscriptsSpec.html However, what I should be doing is just catching 'reload' and 'try-restart' in the * block so the user gets the usage information and 3 is returned by the script. Super easy fix:
Index: dhcpd.init
===================================================================
RCS file: /cvs/dist/rpms/dhcp/RHEL-5/dhcpd.init,v
retrieving revision 1.17
diff -u -p -r1.17 dhcpd.init
--- dhcpd.init 16 Jul 2008 00:03:39 -0000 1.17
+++ dhcpd.init 17 Apr 2009 01:15:24 -0000
@@ -119,9 +119,6 @@ case "$1" in
stop ; start
RETVAL=$?
;;
- try-restart|reload)
- RETVAL=3
- ;;
condrestart)
if [ -f $lockfile ]; then
stop ; start
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. QA, Can I get a qa ack or nak on this? It's a really simple change to the init scripts for dhcpd and dhcrelay. If you pass 'reload' or 'try-restart' to the init script for either service, it should display the usage information and the exit code should be 3. That's what this fix will bring in (right now it only sets the return code, you don't get a usage screen). Fixed in dhcp-3.0.5-20.el5 and later. Verified with dhcp-3.0.5-21.el5
[root@gs-bl460cg1-01 ~]# service dhcpd reload; echo $?
Usage: /etc/init.d/dhcpd {start|stop|restart|condrestart|configtest|status}
3
[root@gs-bl460cg1-01 ~]# service dhcpd try-restart; echo $?
Usage: /etc/init.d/dhcpd {start|stop|restart|condrestart|configtest|status}
3
[root@gs-bl460cg1-01 ~]# service dhcrelay reload; echo $?
Usage: /etc/init.d/dhcrelay {start|stop|restart|condrestart|configtest|status}
3
[root@gs-bl460cg1-01 ~]# service dhcrelay try-restart; echo $?
Usage: /etc/init.d/dhcrelay {start|stop|restart|condrestart|configtest|status}
3
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1331.html |