[Pacemaker] Unable to add ping resource to pacemaker 1.0.12

Richard "Alan" McAlexander alanmac1982 at gmail.com
Wed Oct 17 15:21:42 EDT 2012


That's gotten me a little closer. I'm a bit of a newb when it comes to
Pacemaker, on that note, I put the first group of your post (and changed
the options to match the network I'm working on, I put this first
configuration on the line with the existing group that I have setup.

That group has stuff like apache, smb, dhcp and some custom software that
this existing group is managing. Should I create a new group? Or just keep
it in the existing group?

The second configuration entry for constraints is already populated with
the contraints for the existing group. Should this configuration be pasted
within the existing constraint (<constraint> </constraint>)?

Also, if all my assumptions are correct, then I ran a verify test and got
this output:

/tmp/saved-cib.xml:159: element clone: Relax-NG validity error : Element
group has extra content: clone
/tmp/saved-cib.xml:41: element group: Relax-NG validity error : Element
resources has extra content: group
/tmp/saved-cib.xml:2: element configuration: Relax-NG validity error :
Invalid sequence in interleave
/tmp/saved-cib.xml:2: element configuration: Relax-NG validity error :
Element configuration failed to validate content
/tmp/saved-cib.xml:1: element cib: Relax-NG validity error : Element cib
failed to validate content
crm_verify[4016]: 2012/10/17_12:16:10 ERROR: main: CIB did not pass
DTD/schema validation
Errors found during check: config not valid


Thank you for everything!

Alan

On Wed, Oct 17, 2012 at 8:36 AM, Jake Smith <jsmith at argotec.com> wrote:

>
> ----- Original Message -----
>
> > From: "Richard \"Alan\" McAlexander" <alanmac1982 at gmail.com>
> > To: "The Pacemaker cluster resource manager"
> > <pacemaker at oss.clusterlabs.org>
> > Sent: Tuesday, October 16, 2012 7:23:37 PM
> > Subject: Re: [Pacemaker] Unable to add ping resource to pacemaker
> > 1.0.12
>
> > Hi Jake,
> > Below is my config. Thank you!
>
> > <meta_attributes id="group_its-meta_attributes"/>
> > <primitive id="res_ping_1" class="ocf" provider="pacemaker"
> > type="ping">
> > <instance_attributes id="res_ping_1-instance_attributes">
> > <nvpair id="nvpair-res_ping_1-multiplier" name="multiplier"
> > value="1000"/>
> > <nvpair id="nvpair-res_ping_1-host_list" name="host_list"
> > value="10.254.138.1"/>
> > </instance_attributes>
> > <operations id="res_ping_1-operations">
> > <op interval="0" id="op-res_ping_1-start" name="start" timeout="60"/>
> > <op interval="0" id="op-res_ping_1-stop" name="stop" timeout="20"/>
> > <op id="op-res_ping_1-monitor" name="monitor" interval="10"
> > timeout="60" start-delay="0"/>
> > <op interval="0" id="op-res_ping_1-reload" name="reload"
> > timeout="80"/>
> > </operations>
> > <meta_attributes id="res_ping_1-meta_attributes">
> > <nvpair id="res_ping_1-meta_attributes-target-role"
> > name="target-role" value="started"/>
> > <nvpair id="res_ping_1-meta_attributes-migration-threshold"
> > name="migration-threshold" value="3"/>
> > <nvpair id="res_ping_1-meta_attributes-allow-migrate"
> > name="allow-migrate" value="true"/>
> > <nvpair id="res_ping_1-meta_attributes-resource-stickiness"
> > name="resource-stickiness" value="-INFINITY"/>
> > </meta_attributes>
> > </primitive>
>
> > <rsc_location id="loc_res_ping_1_seaaimsprd1" rsc="res_ping_1"
> > node="seaaimsprd1" score="500"/>
> > <rsc_location id="loc_res_ping_1_seaaimsprd2" rsc="res_ping_1"
> > node="seaaimsprd2" score="500"/>
>
> So I have two things for you.
>
> You need to clone the ping resource so that it runs on all nodes.  You're
> location statements would just cancel each other out and the cluster would
> decide where to put the single res_ping_1 resource.
> For example I do this:
>
>     <resources>
>       <clone id="cl_ping">
>         <meta_attributes id="cl_ping_gateways-meta_attributes">
>           <nvpair id="cl_ping_gateways-meta_attributes-clone-node-max"
> name="clone-node-max" value="1"/>
>           <nvpair id="cl_ping_gateways-meta_attributes-interleave"
> name="interleave" value="true"/>
>           <nvpair id="cl_ping_gateways-meta_attributes-target-role"
> name="target-role" value="Started"/>
>         </meta_attributes>
>         <primitive class="ocf" id="p_ping_gateways" provider="pacemaker"
> type="ping">
>           <instance_attributes id="p_ping_gateways-instance_attributes">
>             <nvpair id="p_ping_gateways-instance_attributes-host_list"
> name="host_list" value="xxxxxxx"/>
>             <nvpair id="p_ping_gateways-instance_attributes-multiplier"
> name="multiplier" value="100"/>
>             <nvpair id="p_ping_gateways-instance_attributes-dampen"
> name="dampen" value="33s"/>
>           </instance_attributes>
>           <operations>
>             <op id="p_ping_gateways-start-0" interval="0" name="start"
> timeout="60s"/>
>             <op id="p_ping_gateways-stop-0" interval="0" name="stop"
> timeout="20s"/>
>             <op id="p_ping_gateways-monitor-10s" interval="10s"
> name="monitor" timeout="60s"/>
>           </operations>
>         </primitive>
>       </clone>
>     </resources>
>
> Then you will have a clone instance of ping on each node.
>
> Then you need to create location constraints for other resources in
> relation to the pingd value.
> For example:
>
>     <constraints>
>       <rsc_location id="l_ntp_ip_with_ping" rsc="p_ip_ntp">
>         <rule boolean-op="or" id="l_ntp_ip_with_ping-rule"
> score="-INFINITY">
>           <expression attribute="pingd" id="l_ntp_ip_with_ping-expression"
> operation="not_defined"/>
>           <expression attribute="pingd"
> id="l_ntp_ip_with_ping-expression-0" operation="lte" value="0"/>
>         </rule>
>       </rsc_location>
>     </constraints>
>
> This contraint requires that resource "p_ip_ntp" must never run on a node
> where the value of pingd is undefined or less than 0.
>
> Here's the crm code for the above:
> primitive p_ping_gateways ocf:pacemaker:ping \
>         params host_list="xxxxx" multiplier="100" dampen="33s" \
>         op start interval="0" timeout="60s" \
>         op stop interval="0" timeout="20s" \
>         op monitor interval="10s" timeout="60s"
>
> clone cl_ping p_ping_gateways \
>         meta clone-node-max="1" interleave="true" target-role="Started"
>
> location l_ntp_ip_with_ping p_ip_ntp \
>         rule $id="l_ntp_ip_with_ping-rule" -inf: not_defined pingd or
> pingd lte 0
>
>
> HTH
>
> Jake
>
>
>
> > On Mon, Oct 15, 2012 at 9:46 PM, Jake Smith < jsmith at argotec.com >
> > wrote:
>
> > > Sorry for the top post.
> >
>
> > > Hard to say much without pacemaker config but did you configure
> > > location constraints for your resources based upon pingd value?
> >
>
> > > Post your pacemaker config or pastebin link to it and we'll be able
> > > to help more.
> >
>
> > > Hth
> >
>
> > > Jake
> >
> > > From: Richard Alan McAlexander
> >
> > > Sent: Mon, 15/10/2012 06:39 PM
> >
> > > To: pacemaker at oss.clusterlabs.org
> >
> > > Subject: [Pacemaker] Unable to add ping resource to pacemaker
> > > 1.0.12
> >
>
> > > _______________________________________________
> >
> > > Pacemaker mailing list: Pacemaker at 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
> >
>
> > _______________________________________________
> > Pacemaker mailing list: Pacemaker at 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
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20121017/4bb64e28/attachment-0003.html>


More information about the Pacemaker mailing list