Operating System - Linux
1748185 Members
4239 Online
108759 Solutions
New Discussion юеВ

Re: How to advertise custom resource agent scripts to RHC's luci?

 
Ralph Grothe
Honored Contributor

How to advertise custom resource agent scripts to RHC's luci?

Hi,

I need to set up an RHCS cluster.
Unfortunately, the delivered resource agents (RA) from the rgmanager package cannot cover start/stop/monitor of the resource I need to make ha.
I wrote a custom RA in accordance with the OCF RA Developer's Guide
http://www.linux-ha.org/doc/dev-guides/ra-dev-guide.html
which correctly dumps its meta-data when invoked with this $__OCF_ACTION.
I placed it in, what seems RHCS's $OCF_ROOT, i.e. /usr/share/cluster and restarted Conga's luci new.
However, my RA does not then appear in the drop down menu list of available RAs within luci when clicking the "Configure a service" tab.
Does anyone know what else is required to advertise my RA to the RHCS?
Madness, thy name is system administration
4 REPLIES 4
Matti_Kurkela
Honored Contributor

Re: How to advertise custom resource agent scripts to RHC's luci?

Which version of RHEL are we talking about?

On RHEL 5, I had to modify the MySQL resource agent for our specific requirements - so I took a copy of the standard MySQL RA, renamed it and applied the modifications to the renamed copy.

On RHEL 5, each agent consists of two files: the actual RA (essentially a script) and a XML file that describes the RA's parameters. From your description, I guess you haven't written a XML file for your RA. The XML file seems to be the key for luci to recognize the RA.

MK
MK
Ralph Grothe
Honored Contributor

Re: How to advertise custom resource agent scripts to RHC's luci?

Hello Matti,

this RHCS runs on RHEL 5.6.

Meanwhile I filed a support request in this matter with RH. This morning I have read their answer which was a pretty sobering,
"There is no official documentation provided by Red Hat to create custom resource agents in RHCS as custom scripts (any related issues to it) are not supported by Red Hat."
So I can't expect any help from there as it looks.
Had I known this beforehand I would have urged our planning and implementation guys to let me set up a Pacemaker/Corosync Cluster instead.

And, yes I did provide a full fledged extra XML metadata file and named it ${OCF_RESOURCE_INSTANCE}.metadata, similar to the shipped e.g. tomcat-5.metadata.
Though I'm convinced that it needn't be in a separate file because according to
http://www.linux-ha.org/doc/dev-guides/ra-dev-guide.html
the custom RA only needs to provide a "meta-data" invocation block which dumps the (well-formed) XML meta-data (in RA scripts usually achieved by a cat of a here-file from a case block.

First I thought just restarting the luci component of Conga wasn't enough to advertise my extension to Conga.
So I also restarted the ricci component.
But this didn't help either.

Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: How to advertise custom resource agent scripts to RHC's luci?

Matti,
your RA did appear as a "Select a resource type" item in luci's drop down list under "Luci-cluster-services-Configure a service" as soon as script and meta data file (.sh, .metadata) were placed in /usr/share/cluster ?

Or did you have something else to provide like e.g. a "provider" attribute to the resource tag?
Or did you have to increase some revision counter like is expected when editing /etc/cluster/cluster.conf manually while cluster services are stopped?
Or did you add an entry in one of the config files of ricci, luci, and rgmanager:

# rpm -qc ricci luci rgmanager
/etc/dbus-1/system.d/ricci-modlog.systembus.conf
/etc/dbus-1/system.d/ricci-modrpm.systembus.conf
/etc/dbus-1/system.d/ricci-modservice.systembus.conf
/etc/dbus-1/system.d/ricci-modstorage.systembus.conf
/etc/dbus-1/system.d/ricci-modvirt.systembus.conf
/etc/dbus-1/system.d/ricci.systembus.conf
/etc/oddjobd.conf.d/ricci-modlog.oddjob.conf
/etc/oddjobd.conf.d/ricci-modrpm.oddjob.conf
/etc/oddjobd.conf.d/ricci-modservice.oddjob.conf
/etc/oddjobd.conf.d/ricci-modstorage.oddjob.conf
/etc/oddjobd.conf.d/ricci-modvirt.oddjob.conf
/etc/oddjobd.conf.d/ricci.oddjob.conf
/etc/pam.d/ricci
/etc/sysconfig/luci
/etc/rc.d/init.d/rgmanager


I have no idea where else to look.
And this seems totally undocumented terrain as if RH tries to hide it from the users, for not to fall prey to possible support queries like mine.
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: How to advertise custom resource agent scripts to RHC's luci?

In case someone might be interested in reading the outcome or my conclusion.
No, the RedHat Cluster Suite does not provide for any extensions of user contributed custom resource agent (RA) or mere modifications of existing ones.
The only officially provided "interface" to this end is the script RA found in /usr/share/cluster/script.sh.
Besides, this is one of the provided RAs which doesn't come with a separate metadata XML file but includes this in its script, because it provides only mere three parameters for user input anyway.

[root@baros:~]
# /usr/share/cluster/script.sh meta-data|grep parameter\ name=





Yesterday, I had a telephone call with Florian Haas of LINBIT (http://www.linbit.com/en/), a profound expert on Linux-HA, and especially DRBD, Pacemaker/Heartbeat Corosync/OpenAIS, whom I contacted in kind of shot at attempt.
He is also the author of the OCF RA Developer's Guide for which I posted the link to in my first thread entry.
Although we haven't got any support contract with LINBIT, unlike with RedHat whose support I found rather disappointing, Florian was most kind and patient explaining to me on the phone the differences between Pacemaker and RHCS's counterpart rgmanager.
While in a Pacemaker cluster the user is given almost unlimited extensibilty through providing own RAs that must only comply with the OCF RA API, and which automatically get advertised to all cluster management tools (e.g. crm shell) as soon as they reside in $OCF_ROOT, with the RHCS the user is restricted to use as RAs what the rgmanager package provides under /usr/share/cluster.
Though theoretically one could extend the RHCS to become custom RA gnostic, this would require intimate knowledge of the innards of the RHCS (and also require modifications of the DTD), and last but not least would void any support for the RHCS product
(though from my experience I wouldn't consider this a serious threat anymore).

So my resume would be, if you want maximum control and extensibility in a Linux HA cluster go for Pacemaker.
The Pacemaker homepage http://clusterlabs.org/ provides many documents and guides how to build a Pacemaker cluster from scratch and how to get started.
I think OpenSUSE's/Novell's Cluster Suite is rather close to Pacemaker, in case one prefers some officially supported Linux enterprise solution.
And of course many small companies which specialized in the field (like e.g. LINBIT or B1) are also apt and willing to support highly specialized cluster solutions.
Madness, thy name is system administration