[ClusterLabs] [Q] Check on application layer (kamailio, openhab)

Andrei Borzenkov arvidjaar at gmail.com
Sat Dec 19 12:13:24 EST 2015


19.12.2015 19:21, Sebish пишет:
> Dear all ha-list members,
> 
> I am trying to setup two availability checks on application layer using
> heartbeat and pacemaker.
> To be more concrete I need 1 resource agent (ra) for openHAB and 1 for
> Kamailio SIP Proxy.
> 
> *My setup:
> *
> 
>    + Debian 7.9 + Heartbeat + Pacemaker + more
>    + 2 Node Cluster with Hot-Standby Failover
>    + Active Cluster with clusterip, ip-monitoring, working failover and
>    services
>    + Copied kamailio ra into /usr/lib/ocf/resource.d/heartbeat, chmod
>    755 and 'crm ra list ocf heartbeat' finds it
> 
> *The plan:*
> 
> _openHAB_
> 
>    My idea was to let heartbeat check for the availabilty of openHAB's
>    website (jettybased) or check if the the process is up and running.
> 
>    I did not find a fitting resource agent. Is there a general ra in
>    which you would just have to insert the process name 'openhab'?
> 

There is heartbeat:anything RA which can be used to start any binary
with any options and monitor by checking whether PID still exists;
additionally you can add monitor hooks that allow you to do anything
(e.g. check availability of website ...)

> _Kamailio_
> 
>    My idea was to let an ra send a SIP-request to kamailio and check,
>    if it gets an answer AND if it is the correct one.
> 
>    It seems like the ra
>   
> https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/kamailio
> 
>    does exactly what I want,
>    but I do not really understand it. Is it plug and play? Do I have to
>    change values inside the code like users, the complete meta-data or
>    else?
> 

Pacemaker configuration contains resource instances; each resource
instance can set value for paramsters; when RA for the instance is
started it receives values from pacemaker. You do not need to change
anything in RA code, just set suitable values in pacemaker configuration.

>    When I try to insert this agent (no changes) into pacemaker using
>    'crm configure primitive kamailio ocf:heartbeat:kamailio' it says:
> 
>        lrmadmin[4629]: 2015/12/19_16:11:40 ERROR:
>        lrm_get_rsc_type_metadata(578): got a return code HA_FAIL from a
>        reply message of rmetadata with function get_ret_from_msg.
>        ERROR: ocf:heartbeat:kamailio: could not parse meta-data:
>        ERROR: ocf:heartbeat:kamailio: could not parse meta-data:
>        ERROR: ocf:heartbeat:kamailio: no such resource agent
> 
> *The question:*_
> 
> _Maybe you could give me some hints on what to do next. Perhaps one of
> you is even already using the kamailio ra successfully or checking a
> non-apache website?

I guess starting with pacemaker documentation makes sense.

> If I simply have to insert all my cluster data into the kamailio ra, it
> should not throw this error, should it? Could have used a readme for
> this ra though...
> If you need any data, I will provide it asap!
> 
> *
> **Thanks a lot to all who read this mail!*
> 
> Sebish
> ha-newbie, but not noobie ;)
> 
> 
> 
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 





More information about the Users mailing list