TheFrenchGuy
TheFrenchGuy

Reputation: 233

Using Corosync + Pacemaker with C++ program

I read the "Cluster from scratch" document on this website : http://clusterlabs.org/doc/ ans I didn't find the answer to my questions :

1) I'm wondering if the Linux Cluster with Pacemaker + Corosync can be used with C++ programs. All the examples are for Apache servers and mostly webservices. Is it just possible ?

2) Is there any document/website that explains the possible links between the cluster status graph (online, active,...) and a potential C++ application graph (application running, stopped, ...).

Upvotes: 0

Views: 614

Answers (3)

Aleksey Burlakov
Aleksey Burlakov

Reputation: 11

As I understand you need to create another type of resources, namely your own C++ application. If so then you will need to implement your own resource agent.

I would propose to look into a Dummy resource agent https://github.com/ClusterLabs/pacemaker/blob/master/extra/resources/Dummy and refactor it for your own needs. Read more about resource agents in https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc

Upvotes: 1

jdm
jdm

Reputation: 1

1) It is possible. I did some tests using c++ simple tcp code.

Upvotes: -1

Beekhof
Beekhof

Reputation: 391

Short version: Resource agents can be written in any language including C++

Long version:

A resource agent is the glue between pacemaker and your daemon. Something that knows how to start, stop and health check your daemon but doesn't hang around afterwards.

Its not completely clear whether you want the agent to be in C++ or want to write an agent for a C++ daemon. I suspect you're asking about the first but really need the second. Best thing to do is say hello upstream (irc or public mailing list) so we can continue the discussion.

Upvotes: 2

Related Questions