On Wed, Jun 25, 2008 at 07:44:25PM -0600, Serge Dubrouski wrote:
> On Wed, Jun 25, 2008 at 5:49 PM, Dejan Muhamedagic <[EMAIL PROTECTED]> wrote:
>> A long story - a short patch :) and the morale:
>> always include a default clause for the switch statement
> 
> Nope. There was a default for OCF_ERRARGS and I conidered that one
> as a correct one for umknown operations. Per my opinion
> OCF_ERR_UNIMPLEMNTED should be used for legal, i.e. defined by the
> OCF standard, operations only.

That's understandable from just looking at the "names" of the error
codes (I made the same assumption), but the specification does make
it slightly clearer that the intention is for ERR_ARG (2) to
indicate a problem with the OCF parameters, not with the arguments
given to the script itself.

It allows the resource script to differentiate between "I don't know
how to <foo>" and "I know how to <foo>, but I can't do it with the
parameters you gave me".

At least, thats my current understanding of it.

http://www.opencf.org/cgi-bin/viewcvs.cgi/specs/ra/resource-agent-api.txt?rev=HEAD
(Section 3.6.1.)

0 No error, action succeeded completely
1 Generic or unspecified error (current practice)
  The "monitor" operation shall return this for a crashed, hung or
  otherwise non-functional resource.
2 Invalid or excess argument(s)
  Likely error code for validate-all, if the instance parameters
  do not validate. Any other action is free to also return
  this exit status code for this case.
3 Unimplemented feature (for example, "reload")

_______________________________________________
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