Hi,

On Wed, Nov 07, 2007 at 06:31:54PM +0100, Sebastian Reitenbach wrote:
> Hi,
> 
> I tried to follow http://www.linux-ha.org/pingd, the section
> "Quickstart - Only Run my_resource on Nodes with Access to at Least One Ping 
> Node"
> 
> therefore I have created the following pingd resources:
> 
>    <clone id="PING_CLONE">

     <clone id="PING_CLONE"  globally_unique="false">

because all the clones will be equal.

>      <meta_attributes id="PING_CLONE_meta_attrs">
>        <attributes>
>          <nvpair id="PING_CLONE_metaattr_target_role" name="target_role" 
> value="started"/>
>          <nvpair id="PING_CLONE_metaattr_clone_max" name="clone_max" 
> value="2"/>
>          <nvpair id="PING_CLONE_metaattr_clone_node_max" 
> name="clone_node_max" value="1"/>
>        </attributes>
>      </meta_attributes>
>      <primitive id="PING" class="ocf" type="pingd" provider="heartbeat">
>        <instance_attributes id="PING_instance_attrs">
>          <attributes>
>            <nvpair id="8381fc80-bdfa-4cf2-9832-be8ff5c7375f" name="pidfile" 
> value="/tmp/PING.pid"/>
>            <nvpair id="142b69d4-2145-4095-afb2-4859a0bb2cee" name="user" 
> value="root"/>
>            <nvpair id="d313ca32-d470-43d2-a234-7c240246d9c9" 
> name="host_list" value="192.168.102.199"/>
>            <nvpair id="57f26ccf-b90d-44b8-a8f2-9e5ab91f2bc3" name="name" 
> value="pingd"/>

add these two
          <nvpair id="..." name="dampen" value="5s"/>
          <nvpair id="..." name="multiplier" value="100"/>

>          </attributes>
>        </instance_attributes>
>      </primitive>
>    </clone>
> 
> 
> and here is my location constraint (entered via hb_gui, thererfore is a 
> value there):
> 
>    <rsc_location id="NFS_MH_PLACE" rsc="NFS_MH">
>      <rule id="prefered_NFS_MH_PLACE" score="100">
>        <expression attribute="pingd" 
> id="4349f298-2f36-4bfa-9318-ed9863ab32bb" operation="defined" value="af"/>
>      </rule>

Looks somewhat strange. There are quite a few better examples on
the page you quoted:

<rsc_location id="my_resource:connected" rsc="my_resource">
    <rule id="my_resource:connected:rule" score_attribute="pingd">
           <expression id="my_resource:connected:expr:defined"
                   attribute="pingd" operation="defined"/>
        </rule>
</rsc_location>

or, perhaps better:

<rsc_location id="my_resource:connected" rsc="my_resource">
  <rule id="my_resource:connected:rule" score="-INFINITY" boolean_op="or">
  <expression id="my_resource:connected:expr:undefined" attribute="pingd" 
operation="not_defined"/>
  <expression id="my_resource:connected:expr:zero" attribute="pingd" 
operation="lte" value="0"/>
  </rule>
</rsc_location>

The latter will have a score of -INFINITY for all nodes which
don't have an attribute or it's value is zero thus preventing the
resource from running there.

> The 192.168.102.199 is just an openbsd host, pingable from both cluster 
> nodes. The NFS_MH resource is a Xen domU.
> On startup of the two cluster nodes, the NFS_MH node went to node1.
> Then I reconfigured the firewall of the ping node to only answer 
> pings from node2. 
> In the cluster itself, nothing happened, but I expected the resource to 
> relocate to the node with connectivity. I still must do sth. wrong I think, 
> any hints?

If you want to check if pingd really works, just do cibadmin -Q
and check the status section of nodes for pingd attribute.

Thanks,

Dejan

> 
> kind regards
> Sebastian
> 
> _______________________________________________
> 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