Red Hat Bugzilla – Bug 1466694
ocf::heartbeat:apache do not move when testurl not accessible from cluster members
Last modified: 2017-06-30 15:32:03 EDT
Description of problem:
ocf::heartbeat:apache does not check the testurl and do not move the resource group to another node.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
pcs resource create APACHE apache configfile="/etc/httpd/conf/httpd.conf" \
statusurl="http://127.0.0.1/server-status" client="curl" \
2.Block port 80 where the webserver is served:
3.Check if status url is accessible from the other nodes:
Move the resource (or entire group) to another cluster node
'ocf::heartbeat:apache' does not start without the "statusurl" option, so they need to be used together
In step 2 the actual command is:
It seems that the "bug" is not a bug.Here is the actual working resource:
pcs resource create APACHE apache params \
configfile="/etc/httpd/conf/httpd.conf" testurl="/" \
testregex="CLUSTER.EXAMPLE.COM" op monitor interval=120s timeout=10s \
The testurl check is run from the same node that is running the apache resource (not from other cluster nodes), so it will succeed as long as the page is accessible locally. Most firewall configurations always allow local connections, even if the port if blocked to other hosts.
And as you figured out, a monitor must be configured with OCF_CHECK_LEVEL=10 for the apache resource agent to run the testurl check.