[ClusterLabs] difference between OCF return codes for monitor action

Ken Gaillot kgaillot at redhat.com
Wed Oct 21 15:05:52 UTC 2015


On 10/21/2015 07:44 AM, Kostiantyn Ponomarenko wrote:
> Hi,
> 
> What is the difference between "OCF_ERR_GENERIC" and "OCF_NOT_RUNNING"
> return codes in "monitor" action from the Pacemaker's point of view?
> 
> I was looking here
> http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-ocf-return-codes.html
> , but I still don't see the difference clearly.
> 
> Thank you,
> Kostya

OCF_ERR_GENERIC is a "soft" error, so if any operation returns that,
Pacemaker will try to recover the resource by restarting it or moving it
to a new location.

OCF_NOT_RUNNING is a state (not necessarily an error). When first
placing a resource, Pacemaker will (by default) run monitors for it on
all hosts, to make sure it's not already running somewhere. So in that
case (which is usually where you see this), it's not an error, but a
confirmation of the expected state. On the other hand, if Pacemaker gets
this when a resource is expected to be up, it will consider it an error
and try to recover. The only difference in that case is that Pacemaker
will not try to stop the resource because it's already stopped.




More information about the Users mailing list