[Pacemaker] state of resource when start returns success

Alan Jones falancluster at gmail.com
Thu Mar 24 21:38:29 UTC 2011


I'm not asking about the behavior of the agent, but the status
reported by pacemaker.
An RA can correctly conform to the OCF specification and also take
significant time for the start to complete.
During that time pacemaker reports the resource state as 'Started'.
How can I get access to an internal state in pacemaker that can
distinguish between 'start in progress' and 'start completed'?
Alan

On Thu, Mar 24, 2011 at 2:12 PM, Lars Ellenberg
<lars.ellenberg at linbit.com> wrote:
> 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
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>




More information about the Pacemaker mailing list