Friday, January 22, 2010

[Linux-HA] what's the proper way to do an apache 'reload' ?

SkyHi @ Friday, January 22, 2010
You have two ways to do this:

1)Do a "graceful shutdown" (it is a restart indeed) 
  /usr/sbin/apachectl -k graceful
 In Apache2 there's this way to restart apache, where each process stop serving new request and are terminated, 
 and new request are server by new, fresh httpd process (with new configuration).
 I use this method to restart apache after rotating the logs.
2)- put the resource in heartbeat "unmanaged state"
    crm_resource -S is_managed -v false -r  -t primitive
  - restart/reload/do anything with apache. Heartbeat won't do anything with it, even if you kill apache (amazingly... it's unmanaged!! ;-) )
  - finally re-put apache under heartbeats's control:
crm_resource -S is_managed -v true -r  -t primitive