Ok, think I got it all figured out, please comment:
The files in /etc/ha.d/resource.d are "wrappers" to the actual RA's in
/usr/lib/ocf/resource.d
With some slight modification to the "standard" wrapper, I was able to get
my resource to be detected by the gui, and added successfully to my test
cluster.
This required the addition of an OCF_PROVIDER env variable to the wrapper
script, as well as the modification of the hto-mapfuncs file.
At approximately line 40 of the /etc/ha.d/resource.d/hto-mapfuncs file, the
following appears:
__SCRIPT_NAME="${OCF_RA_DIR}/heartbeat/${OCF_TYPE}"
This only allowed RA's to be found under /heartbeat, in the ${OCF_RA_DIR}
I have made the following modification to my hto-mapfuncs:
if [ ${OCF_PROVIDER} ]; then
__SCRIPT_NAME="${OCF_RA_DIR}/${OCF_PROVIDER}/${OCF_TYPE}"
else
__SCRIPT_NAME="${OCF_RA_DIR}/heartbeat/${OCF_TYPE}"
fi
With the inclusion of the OCF_PROVIDER env variable in the wrapper script,
this allows for backward compatibility, as well as providing new RA's as
suggested by the spec.
What does everybody think ?
Out of curiosity, can somebody explain the need for the "wrapper" scripts ?
It seems like one more level of complexity.....
Thanks
W
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wayne Hannam
Sent: Tuesday, May 06, 2008 1:57 PM
To: 'General Linux-HA mailing list'
Subject: RE: [Linux-HA] Custom OSF resource agents
Ok, now were getting somewhere.......
There is a way to put the gui in debug mode, by upping the debug level in
the haclient.py script.
That allowed me to see that it's only scanning /etc/ha.d/resource.d for OCF
resources, and /etc/init.d for LSB resources.
I'm not a Python guy, so I can't really go through the code and see what's
going on.
Can anybody lend a hand ?
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Wayne Hannam
Sent: Tuesday, May 06, 2008 1:33 PM
To: 'General Linux-HA mailing list'
Subject: RE: [Linux-HA] Custom OSF resource agents
I have tested the script standalone, and it works exactly as designed.
Is there any way to run the GUI in debug mode to see what it's doing ?
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Edward Capriolo
Sent: Tuesday, May 06, 2008 12:53 PM
To: General Linux-HA mailing list
Subject: Re: [Linux-HA] Custom OSF resource agents
Try testing outside of HA.
When building a script I usually manually add OCF_RESKEY_BLA=RealVALUE
at the top of my scripts. In this way I can test from the prompt.
This may not work for everything but it has worked for me.
try
#script start ; echo $?
#script stop ; echo $?
#script status ; echo $?
On Tue, May 6, 2008 at 2:46 PM, Wayne Hannam <[EMAIL PROTECTED]>
wrote:
> Sorry for the delay, thank you for the replies,
>
> I have checked the file perms, 755, and run it through OCF tester with no
> errors. The RA does control the resource correctly when used manually.
>
> Any other thoughts/suggestions ?
>
> Thanks
> Wayne hannam
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
>
> [mailto:[EMAIL PROTECTED] On Behalf Of Dejan
Muhamedagic
> Sent: Monday, May 05, 2008 5:22 AM
> To: General Linux-HA mailing list
> Subject: Re: [Linux-HA] Custom OSF resource agents
>
>
>
> Hi,
>
> On Fri, May 02, 2008 at 12:21:01PM -0600, Wayne Hannam wrote:
> > I cannot seem to get custom resource agents to show up in the GUI.
> >
> >
> >
> > I am storing them under /usr/lib/ocf/resource.d/<provider_name>.
> >
>
> That should work.
>
> >
> > I have also tried putting them in /usr/lib/ocf/resource.d/heartbeat,
but
> to
> > no avail.
> >
> >
> >
> > Any suggestions ?
>
> Check permissions, they should be 755. You can also run
> ocf-tester to check if the agent's compliant.
>
> Thanks,
>
> Dejan
>
> >
> >
> >
> > Thank you
> >
> > Wayne Hannam
> >
> > Parasynthion Technologies
> >
> > _______________________________________________
> > Linux-HA mailing list
> > [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems