[Pacemaker] Stateful RA

Andrew Beekhof andrew at beekhof.net
Wed Jun 2 10:46:47 UTC 2010


On Wed, Jun 2, 2010 at 9:39 AM, Vadym Chepkov <vchepkov at gmail.com> wrote:
>
> On Jun 2, 2010, at 3:08 AM, Andrew Beekhof wrote:
>
>> On Wed, Jun 2, 2010 at 8:55 AM, Vadym Chepkov <vchepkov at gmail.com> wrote:
>>> Hi,
>>>
>>> I was looking into Stateful resource agent  (branch:      stable-1.0)
>>>
>>> stateful_start() {
>>>    stateful_check_state master
>>>    if [ $? = 0 ]; then
>>>        # CRM Error - Should never happen
>>>        return $OCF_RUNNING_MASTER
>>>    fi
>>> ...
>>>
>>> Why does it return $OCF_RUNNING_MASTER when master is not running?
>
>> But it is running, as a master. Thats what the code says.
>>
>
> D'oh, I read it wrong, sorry (too much C code before)
> But it's not an error to have "master" start in "master" mode right away, without waiting for "promote" it seems, right?

It is an error.
Because we'd only ever send a start operation to a stopped or started
resource. Never one thats already been promoted.




More information about the Pacemaker mailing list