Hi,

On Thu, Sep 18, 2008 at 10:44:35AM +0800, heartbeat wrote:
> Hi all,
>  A port of my cib.xml as follows:
>  ............................
>  <group id="group1">
>          <primitive id="ap_1_ip_217" class="ocf" type="IPaddr2" 
> provider="heartbeat">
>            <instance_attributes id="ap_1_ip_attr_1">
>              <attributes>
>                <nvpair id="ap_1_ipaddr_1" name="ip" value="10.1.41.217"/>
>                <nvpair id="ap_1_nic_1" name="nic" value="eth1:1"/>
>                <nvpair id="ap_1_mask_1" name="netmask" value="25"/>
>              </attributes>
>            </instance_attributes>
>          </primitive>
>          <primitive id="ap_1_ip_217_agent" class="ocf" type="myagent" 
> provider="heartbeat">
>            <operations>
>              <op id="1" name="monitor" interval="5s" timeout="4s" 
> on_fail="restart"/>
>            </operations>
>          </primitive>
> </group>
>  ...........................
>  I wrote my resource script "myagent", and heartbeat would call
>  the "monitor" action every 5s.  I want that if the "monitor"
>  action failed(monitor action's return code isn't 0),the
>  resource group including "ap_1_ip_217" and
>  "ap_1_ip_217_agent" will re-allocate on the other node. So I
>  assign the value "restart" to the option "on_fail".  But I
>  found that the rescource group did not re-allocate at all when
>  the monitor action return a non-zero code.  why does it
>  happen? How can I achieve my goal?

If you want a resource to migrate to another node, then you
should set the resource-stickiness appropriately. You can take a
look here: http://www.linux-ha.org/v2/faq/forced_failover

Thanks,

Dejan

>  Thanks in advance!
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
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