[Pacemaker] state of resource when start returns success

Lars Ellenberg lars.ellenberg at linbit.com
Thu Mar 24 21:12:25 UTC 2011


On Thu, Mar 24, 2011 at 01:21:19PM -0700, Alan Jones wrote:
> What is the best way to query pacemaker for the state the resource is
> in when the RA's start function has returned success?
> (... as apposed to when the RA's start function has been called.)
> I've tried:
>         /usr/sbin/crm resource show
>         /usr/sbin/crm_resource --resource <resource_name> --locate
> and even (only for the brave):
>         /usr/sbin/cibadmin --query
> But so far all I can get is Stopped or Started.
> Started seems to include 3 states from my prospective: Starting,
> Online and Stopping.
> Obviously, pacemaker has some kind of internal states for these
> because ordering dependencies are observed.
> Has anyone else solved this problem?
> Alan

The RA is not supposed to just "trigger start up of a resource",
(caused it to be "Starting" in your terminology).

The RA is supposed to make sure the resource is actually "Online".

So per definition, if the resource agent returns success for "start",
the resource is Started (what you call "Online").

If the resource agent returns, before the resource is actually
operational ("Online"), that would be a bug of the resource agent.

	Lars




More information about the Pacemaker mailing list