can you resend with the changes in the form of a diff?
On Thu, Sep 18, 2008 at 15:34, sony thapa <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I created an ocf resource agent named ResourceAgent.
> I added it in the python script, and I did not give any values like
> parameters(because I dont have any parameters to set) or time.
> when I executed this python script, it gave me an error.
> like, I have added my ResourceAgent like this
> ocf_ra_setting = {
> "ResourceAgent",
>
> Then it gave an error message like
>
> File "/usr/local/lib64/heartbeat/haresources2cib.py", line 35
> "ResourceAgent",
> ^
> SyntaxError: invalid syntax
>
> So, I have modified the python script
> (/usr/local/lib64/heartbeat/haresources2cib.py),
> It worked, I mean, it converted from haresources to cib.xml and gave default
> values to the timeout and time-interval.
> The script ran successfully.
> Below is the function, which I modified.
>
> def get_ra_class(type) :
> if os.path.exists("/usr/local/etc/ha.d/resource.d/"+"/"+type) :
> return "heartbeat"
> if os.path.exists("/etc/init.d"+"/"+type) :
> return "lsb"
>
> added one is highlighted
> if os.path.exists("/usr/lib/ocf/resource.d/heartbeat/"+"/"+type):
> return "ocf"
> sys.stderr.write(type+" is an unknown Resource Agent. " \
> "Please refer to
> http://www.linux-ha.org/ResourceAgent\n")
> return "UNKNOWN"
>
> I preferred this method, because we need not add the resourceagents manually
> in this script, which is a slight overhead.
> Can we do like this? please suggest
> And I also want to know that from where the default values of timeout and
> time-interval came from?
>
> Please help me out with this.
> _______________________________________________
> 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