Hi:

I'm writing scripts to dynamically add, remove, manage, and unmanage
resources from the CIB.  We already have scripts that start and stop
heartbeat.  What I'm doing is updating our code so we can use V2.  To
add resources to a V1 configuration, you simply added the resource
information to /etc/ha.d/haresources; if heartbeat was already
running, you told heartbeat to reload the configuration, if not you
could start heartbeat.  With a V2 configuration, however, it seems
like heartbeat has to be running before you can change the CIB.  This
implies the need for a way to determine whether the CIB is available.
One way I see is to run 'crm resource status 2>/dev/null' and look for
a 0 return code, since it returns 1 if heartbeat isn't running
locally.  (I should note that 'crm configure show' returns 0 even if
it can't connect to heartbeat.)  Is this a reasonable thing to do?
Anything to be careful of when using this approach?

Regards,

Nick
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to