[ClusterLabs Developers] SDK/API's for Pacemaker/Corosync

Vinod Chegu vinodchegu at gmail.com
Mon Feb 4 17:11:03 UTC 2019


Hi Ken

Thanks for your response and pointers !

What you suggest is certainly one option.

If there are any examples of using the C API's please point me to the same.
'am trying to search for them too.

Thanks!
Vinod

On Mon, Feb 4, 2019 at 8:57 AM Ken Gaillot <kgaillot at redhat.com> wrote:

> On Sun, 2019-02-03 at 08:44 -0800, Vinod Chegu wrote:
> > Hello,
> >
> > 'am new to this forum and am looking for some pointers.
> >
> > Are there any Python based examples (in some github repo etc) that
> > show the usage of Pacemaker/Corosync APIs for creation and management
> > (add/delete/list/[un]maintenance, monitor alerts) of cluster of Linux
> > nodes?
> >
> > Thanks !
> > VC
>
> Hi Vinod,
>
> There is currently no Python API, though that is on the long-term wish
> list.
>
> Corosync and Pacemaker each have C APIs, but those are likely much
> lower level than you're interested in. For cluster creation etc., the
> command-line tools are the primary way to interact with the cluster, so
> using those with subprocess.call() would be one way to go.
>
> The higher-level tools crm shell and pcs provide an easier interface to
> both corosync and pacemaker, so you may want to pick one of them
> instead, at the cost of creating an additional dependency for your
> tool.
>
> For alerts, you can have pacemaker call a Python script with
> interesting info passed as environment variables. See:
>
>
> http://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#idm140330787858944
> --
> Ken Gaillot <kgaillot at redhat.com>
>
> _______________________________________________
> Developers mailing list
> Developers at clusterlabs.org
> https://lists.clusterlabs.org/mailman/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/developers/attachments/20190204/61fabebc/attachment.html>


More information about the Developers mailing list