[ClusterLabs] Apache graceful restart not supported by heartbeat apache control script
cmiller at pagedna.com
Mon Mar 25 13:42:04 EDT 2019
Hi users at clusterlabs.org,
My current project at work is a two node cluster running apache and virtual IPs on CentOS 7. I found in my testing that apache when run by corosync does not have a reload or graceful restart. Before the cluster, when apache was a single instance, I previously used graceful restart to be able to add configurations with out affecting current users of the system.
Initially, I tried adding the capability myself as a resource action in the pcs configuration, I was able to add the action, but it would have no effect when run. Digging deeper, I eventually found the apache control script at /usr/lib/ocf/resource.d/heartbeat/apache and was able to see that there are no commands available for a graceful restart, only graceful stop.
Currently, I have found two ways of getting around this limitation. The first is “/bin/kill -USR1 `cat /var/run/httpd.pid`", and the second is "/bin/test -f /var/run/httpd.pid && /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf -c "PidFile /var/run/httpd.pid" -k graceful”. Both seem to work with out adversely affecting corosync.
My primary question is; what is the reason that graceful restart is not supported by the heartbeat apache control script? It seems like a pretty common usage of apache, so it seems a strange omission from the script. I am concerned that I’m trying to work against the grain since it is absent from the script.
My second question is; are the two work arounds presented above safe for use with corosync/heartbeat/pcs? Is one preferable to the other? If neither are safe, how would you recommend being able to update apache configurations with no downtime?
I am new to this list and could not find a way to search the archives, so if this question has already been answered, could you point me to the search area and to the answer as well?
Thank you in advance for your advice and recommendations.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users