Hi,

I have structured my multi-state resource agent as below when the
underlying resource becomes unavailable for some reason:

monitor()
{
    state=get_primitive_resource_state()

    ...
    ...
    if ($state == unavailable)
       return $OCF_NOT_RUNNING

    ...
    ...
}

stop()
{
    monitor()
    ret=$?

    if (ret == $OCF_NOT_RUNNING)
       return $OCF_SUCCESS
}

start()
{
    start_primitive()
    if (start_primitive_failure)
        return OCF_ERR_GENERIC
}

The idea is to make sure that stop does not fail when the underlying
resource goes away.
(Otherwise I see that the resource gets to an unmanaged state)
Also, the expectation is that when the resource comes back, it joins the
cluster without much fuss.

What I see is that pacemaker calls stop twice and if it finds that stop
returns success,
it does not continue with monitor any more. I also do not see an attempt to
start.

Is there a way to keep the monitor going in such circumstances?
Am I using incorrect resource agent return codes?

Thanks,
Pavan
_______________________________________________
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to