[Linux-HA] changing a resource from the NOT ACTIVE state

John McAleer john.mcaleer at cp.net
Wed Feb 1 11:27:32 MST 2006


Hi,

I got a resource into a state where the crm_mon -c showed

 ./crm_mon -c

Refresh in 12s...
============
Current DC: gsm2.cpth.ie (772cba10-4fb9-48de-9e08-ecbc86af7145)
1 Nodes configured.
1 Resources configured.
============

Node: gsm2.cpth.ie (772cba10-4fb9-48de-9e08-ecbc86af7145): online

Resource Group: cds_grp
    cds_grp:cds_res (heartbeat::ocf:cds):       NOT ACTIVE

Is there a way to recover that without restarting heartbeat ?

After restarting heartbeat, the status was

./crm_mon -c

Refresh in 5s...
============
Current DC: gsm2.cpth.ie (772cba10-4fb9-48de-9e08-ecbc86af7145)
1 Nodes configured.
1 Resources configured.
============

Node: gsm2.cpth.ie (772cba10-4fb9-48de-9e08-ecbc86af7145): online

Resource Group: cds_grp
    cds_grp:cds_res (heartbeat::ocf:cds):       gsm2.cpth.ie (772cba10-4fb9-48de-9e08-ecbc86af7145)

Is there a command that can get the resource into that state again ?

I had put my resource in "NOT ACTIVE" state as follows:

My cib declares a resource that is monitored. 

        <resources>
            <group id="cds_grp">
                <primitive class="ocf" id="cds_res" provider="heartbeat" type="cds">
                    <operations>
                       <op id="1" name="monitor" interval="60s" timeout="30s" on_fail="stop"/>
                    </operations>
                </primitive>
            </group>
        </resources>

The script cds just has stubs for start stop and monitor. I changed the monitor stub to return $OCF_ERR_GENERIC
heartbeat stop the resource and restarted it. The monitor continues to fail. There is no other live node so eventually heartbeat stopped trying to start the resource.
At this point the resource was NOT ACTIVE. The last transition log looks like

Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(unpack.c:unpack_graph): Beginning transition 1467 : timeout set to 120000ms
Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(unpack.c:unpack_graph): Unpacked 3 actions in 3 synapses
Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(tengine.c:initiate_transition): Initating transition
Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(tengine.c:initiate_action): Executing pseudo-event (5): stop on (null)
Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(tengine.c:cib_action_updated): Initiating action 2: stop cds_grp:cds_res on gsm2.cpth.ie
Feb  1 16:35:19 gsm2 crmd: [10435]: info: mask(lrm.c:do_lrm_rsc_op): Performing op stop on cds_grp:cds_res
Feb  1 16:35:19 gsm2 cds[23513]: [23519]: INFO: CDS DB has been stoppedy
Feb  1 16:35:19 gsm2 cib: [10432]: WARN: mask(io.c:initializeCib): Option suppress_cib_writes not set
Feb  1 16:35:19 gsm2 crmd: [10435]: info: mask(fsa.c:do_state_transition): State transition S_TRANSITION_ENGINE -> S_IDLE [ input=I_TE_SUCCESS cause=C_IPC_MESSAGE origin=do_msg_route ]
Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(tengine.c:match_graph_event): Action 2 confirmed
Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(tengine.c:initiate_action): Executing pseudo-event (6): stopped on (null)
Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(tengine.c:check_for_completion): Transition complete
Feb  1 16:35:19 gsm2 tengine: [10884]: info: mask(utils.c:send_complete): 1467 - Transition status: Complete: complete

I have change my monitor stub back to return OK.

Regards,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux-ha.org/pipermail/linux-ha/attachments/20060201/29b9b622/attachment.html>


More information about the Linux-HA mailing list