rg_test for testing other resource agent functions?

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

 



I can do this:
sudo rg_test test /etc/cluster/cluster.conf status service [servicename]

To see what happens when I run a resource agent with the "status"
command line argument, in exactly the same context as RHCS would
run it - using the environment variables derived from cluster.conf,
and potentially running multiple resource agents or the same one more
than once with different variables, depending on what resources are
defined for that service.

It would be very useful to be able to use a similar framework to run
an arbitrary script, or an arbitrary resource agent command line option,
with the same automatic expansion from cluster.conf.

Unfortunately, rg_test only supports a short hardcoded set of options:
stop, start, and status.

For example, I want to add a "verify" procedure to my resource agent,
that I'd like to kick off from a monitoring script on my own schedule,
but I want to make sure that it is run in the same context as the
resource agent's status check is normally run.  I could write some
separate cluster.conf parser that simulates what I think rgmanager
would do, but I might get it wrong.  Or rgmanager might change in a
future version and I wouldn't track the change.

Is there anything like rg_test that might let me do this, or has
anyone patched rg_test to allow it?  Something as simple as:
  sudo rg_test test /etc/cluster/cluster.conf [foo] service [servicename]

... where it would simply call the resource agent the same way as it
does for status/start/stop, but substitute whatever command line
argument I give it.

Or do I have to reverse-engineer my own cluster.conf parsing to set up
the environment and run the script(s) myself (duplicating what rg_test
already does for status/start/stop) ?
  -- 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