Bug 13278 - Apache init script graceful restarts, proper exit values
Summary: Apache init script graceful restarts, proper exit values
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: apache
Version: 6.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL: http://www.apache.org/docs/stopping.html
Whiteboard:
: 49235 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-06-30 16:59 UTC by sumnerh
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-09-04 23:16:17 UTC
Embargoed:


Attachments (Terms of Use)

Description sumnerh 2000-06-30 16:59:28 UTC
Apache's init script needs a small addition to allow it to perform graceful
restarts--graceful restarts do zero-downtime updates of loaded modules and
configuration file alterations.  This is very handy for people using Apache
on mission-critical servers.

The URL I listed explains exactly what how graceful restarts work.

Here's what I added to the /etc/rc.d/init.d/httpd init script:

  hotstart)
        echo -n "Hot starting httpd: "
        killproc httpd -USR1
        echo
        ;;

"graceful" might be a better name for the target than "hotstart".  Also, it
would make a lot of sense to store the killproc return value and exit from
the init script with that return value.  That would turn the above into:

  graceful)
        echo -n "Gracefully restarting httpd: "
        killproc httpd -USR1
        RV=$?
        echo
        exit $RV
        ;;

And the default line ("Usage: $0 {.....}") should probably mention the
graceful/hotstart option.

E-mail me if you have any questions: SumnerH at fool.com

Comment 1 Nalin Dahyabhai 2000-06-30 22:55:08 UTC
This should be incorporated into apache-1.3.12-10, which will hit Raw Hide soon.

Comment 2 Matthew Miller 2001-09-04 23:13:29 UTC
actually, this isn't in the very latest rawhide (apache-1.3.20-15). Looks from
the comments like it was added at one point, but now it's gone again.

Comment 3 Matthew Miller 2001-09-04 23:14:13 UTC
*** Bug 49235 has been marked as a duplicate of this bug. ***

Comment 4 Matthew Miller 2001-09-04 23:16:13 UTC
The apachectl script that comes with apache also has a "configtest" option,
which would be nice.

Comment 5 Joe Orton 2002-05-27 11:56:30 UTC
The apache packages do now support "service httpd configtest".


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