[ClusterLabs Developers] OCF_ERR_ARGS vs OCF_ERR_INSTALLED

Jehan-Guillaume de Rorthais jgdr at dalibo.com
Wed Nov 9 12:10:02 EST 2016

On Wed, 9 Nov 2016 10:40:46 -0600
Ken Gaillot <kgaillot at redhat.com> wrote:

> On 11/09/2016 09:57 AM, Jehan-Guillaume de Rorthais wrote:
> > Hi,
> > 
> > It seems OCF_ERR_ARGS has different meanings according to documentations:
> > 
> >   http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-ocf-return-codes.html
> >   «The resource’s configuration is not valid on this machine. E.g. it
> > refers to a location not found on the node. »
> > 
> >   http://www.linux-ha.org/doc/dev-guides/_literal_ocf_err_args_literal_2.html
> >   «The resource agent was invoked with incorrect arguments. This is a safety
> >   net "can’t happen" error which the resource agent should only return when
> >   invoked with, for example, an incorrect number of command line arguments.»
> > 
> > When I want to test on the local node if the resource is in the good path,
> > using the correct version, with needed setup etc, correctly, I'm not sure
> > if I should return either OCF_ERR_ARGS or OCF_ERR_INSTALLED because of this
> > subtle different definitions...
> > 
> > I suppose "Pacemaker Explained" is a bit fresher source of documentation?  
> Unfortunately, this is some of the divergence from the original OCF
> standard that's accrued over the years. Also, Pacemaker uses
> OCF_ERR_CONFIGURED for what linux-ha.org is describing here.
> Clarifying the exit code meanings is one of the goals of the next
> revision of the OCF standard -- a slow process mainly due to time
> constraints. So far, we've gotten a reasonable level of community
> consensus that ClusterLabs should be the home of the standard, and we
> can use the mailing lists and github pull requests to discuss and make
> revisions to the standard. I'd like to update the ClusterLabs and OCF
> websites before going very far down that road, but my time for that is
> limited.

I can guess :(

I can make a PR about this specific subject if you want to fix the ocf-dev
guide according to the Pacemaker point of view.

> Until then, my recommendation would be that if you intend your agent
> primarily for use with pacemaker, follow pacemaker's documentation.

Great, thank you again Ken for your answers!


More information about the Developers mailing list