Re: HA agents (cluster scripts)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I want to write few scripts for my company's services, and I don't know
> how to debug the scripts?
> 
> Is there any documentation regarding the issue, or something similar?

I ran into the same problem this summer.  Unfortunately, the answer is
that mostly, full documentation does not exist.  However, there are a
few scraps you may find very useful.

First, here are some notes on the Open Cluster Framework's resource
agent API:

http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/resource-agent-api.txt?rev=HEAD

If you're doing Red Hat Cluster Suite, there's more to it than the
OCF-common parts.  For example, RHCS metada is, I believe, specific
to RHCS.  I pointed out some holes in the documentation to Lon on
IRC a few weeks ago, and he began writing this page:

http://sources.redhat.com/cluster/wiki/RGManagerResourceAgents

It's still very incomplete, but already very useful (thanks Lon!)

Also, some things you can do for debugging:

1. Sprinkle some ocf_log calls in strategic places in your script:

  ocf_log info "some debugging statement, including a $OCF_variable"

 -> Make sure /usr/sbin is in your resource agent's path!

2. Configure logging so that your log statements make it to syslog.

See http://sources.redhat.com/cluster/wiki/RGManager

3. Use rg_test, which I didn't know about at first.  For example:

  sudo rg_test rules
  sudo rg_test test /etc/cluster/cluster.conf
  sudo rg_test test /etc/cluster/cluster.conf status service myservice
  sudo rg_test test /etc/cluster/cluster.conf start service myservice

It turns out this is documented in the ResourceTrees page on the
cluster wiki, but I didn't read that far on that page because I
wasn't having any trouble understanding or configuring my resource
trees.  It's true that rg_test is useful for debugging resource
trees, however it's also useful for troubleshooting resource agents.

  -- Cos

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster


[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux