[ClusterLabs] Howto use ocf:heartbeat:nginx check level > 0
Ken Gaillot
kgaillot at redhat.com
Mon Nov 9 22:18:24 UTC 2015
On 11/08/2015 04:46 AM, user.clusterlabs.org at siimnet.dk wrote:
>
>> On 8. nov. 2015, at 10.26, user.clusterlabs.org at siimnet.dk wrote:
>>
>> Setting up my first pacemaker cluster, I’m trying to grasp howto make ocf:heartbeat:nginx monitor with check levels > 0.
>>
>> Got this so far:
>>
>> [root at afnA ~]# pcs resource
>> Resource Group: afnGroup
>> afnVIP (ocf::heartbeat:IPaddr2): Started afnA
>> afnNGinx (ocf::heartbeat:nginx): Started afnA
>>
>> [root at afnA ~]# pcs resource show afnNGinx
>> Resource: afnNGinx (class=ocf provider=heartbeat type=nginx)
>> Attributes: configfile=/opt/imail/nginx/conf/nginx.conf port=8080 httpd=/opt/imail/nginx/sbin/nginx options="-p /opt/imail/nginx" status10url=/ping status10regex=".+ is alive\."
>> Operations: start interval=0s timeout=60s (afnNGinx-start-interval-0s)
>> stop interval=0s timeout=60s (afnNGinx-stop-interval-0s)
>> monitor interval=10s timeout=20s (afnNGinx-monitor-interval-10s)
>> monitor interval=60s timeout=20s (afnNGinx-monitor-interval-60s)
>> [root at afnA ~]#
>>
>> but I cant verify that pacemaker RA ever calls http://localhost:8080/ping <http://localhost:8080/ping>, why not?
>>
>> Any pointers to info source(s) for better understanding RA configuration and maybe specially check levels?
>
> Found this: http://clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-operation-monitor-multiple.html <http://clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-operation-monitor-multiple.html>
>
> This seemed to work much better:
>
> [root at afnA ~]# pcs resource show afnNGinx
> Resource: afnNGinx (class=ocf provider=heartbeat type=nginx)
> Attributes: configfile=/opt/imail/nginx/conf/nginx.conf port=8080 httpd=/opt/imail/nginx/sbin/nginx options="-p /opt/imail/nginx" status10url=http://localhost:8080/ping status10regex="mss[0-9] is alive\."
> Meta Attrs: target-role=Started
> Operations: start interval=0s timeout=60s (afnNGinx-start-interval-0s)
> stop interval=0s timeout=60s (afnNGinx-stop-interval-0s)
> monitor interval=10s timeout=10s (afnNGinx-monitor-interval-10s)
> monitor interval=120s timeout=30s OCF_CHECK_LEVEL=10 (afnNGinx-monitor-interval-120s)
>
> =>
>
> 127.0.0.1 - - [08/Nov/2015:11:34:25 +0100] "GET /ping HTTP/1.1" 200 16 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2"
> 127.0.0.1 - - [08/Nov/2015:11:36:25 +0100] "GET /ping HTTP/1.1" 200 16 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2"
> 127.0.0.1 - - [08/Nov/2015:11:38:25 +0100] "GET /ping HTTP/1.1" 200 16 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2"
> 127.0.0.1 - - [08/Nov/2015:11:40:25 +0100] "GET /ping HTTP/1.1" 200 16 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2"
>
>
> [root at afnA]# pcs --version
> 0.9.139
>
> https://www.mankier.com/8/pcs <https://www.mankier.com/8/pcs> seems to indicate a debug-monitor command only my pcs version doesn’t seem to support this, might it only be in a later version, also I can seem to find ocf-tester from CentOS 6 repository, where might I find ocf-tester rpm?
>
> /Steffen
Support for debug-monitor was added to pcs upstream in June of this
year; not sure what version that corresponds to.
ocf-tester is part of the upstream resource-agents package
(https://github.com/ClusterLabs/resource-agents). As I understand it, it
is not included in the RHEL/CentOS releases because it has SuSE-specific
code. It could be made more portable but it's not a high priority.
Patches welcome of course :)
More information about the Users
mailing list