On Wed, Jun 25, 2008 at 22:53, Serge Dubrouski <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 25, 2008 at 12:59 PM, Andrew Beekhof <[EMAIL PROTECTED]> wrote:
>>
>> On Jun 25, 2008, at 8:28 PM, Serge Dubrouski wrote:
>>
>>>>>
>>>>> So there is no need for an RA to support "fail" operation? Then why it
>>>>> is gets called with it?
>>>>
>>>> precisely because it doesn't support it - to get an error.
>>>
>>> Sounds like we are going round. What would support for that "fail"
>>> operation mean on RA level? What is RA supposed to to when it's called
>>> with a "fail" operation besides answering that it's not yet
>>> implemented?
>>
>> it should return the same thing that it should when called with
>> idontsupportthisaction or abcdefg or fred
>>
>> 2
>>
>> as in "not supported"

Sorry, I got the two error codes swapped in my head.
I should have said '3' aka. OCF_ERR_UNIMPLEMENTED  not '2'

> Now you got me completely lost.  Per what you tell here an RA has to
> always answer "I don't know what it is" when it's called with "fail"
> operation. What is the reason for this? I mean what is the reason to
> call an RA with the operation that isn't expected to be supported?

so that the error shows up in the cluster and it can do something about it.
we're trying to tell the cluster that the resource has failed remember?

>
> Then, there are 2 different return codes: OCF_ERR_UNIMPLEMENTED and
> OCF_ERR_ARGS. I always thought that an RA is supposed to return  first
> one for operations that has to be supported but not yet implemented
> and a second one for "fred", "asdasdjlasd" or any other junk. So pgsql
> returns OCF_ERR_ARGS for "fail" operation but CRM expects
> OCF_ERR_UNIMPLEMENTED.


> Should I change pgsql in a way that it'll
> return OCF_ERR_UNIMPLEMENTED for any unknown operation?

yes - because the RA doesn't know how to deal with it
_______________________________________________
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