Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Users

Help with recource location constraint

 

 

Linux-HA users RSS feed   Index | Next | Previous | View Threaded


BPHILLIP at arinc

Aug 23, 2010, 5:01 AM

Post #1 of 3 (279 views)
Permalink
Help with recource location constraint

Hi,

I'm running Pacemaker 0.6 two-node active/passive cluster (plan to migrate
to latest in the next couple of months when my management will allow it). I
have a group resource that runs on the active node and a clone resource that
runs on both nodes. I'm using OCF resource agents. I want to implement the
following location constraint assuming I have Group Resource "GrpApps" and
Clone Resource "CloneApp":

If CloneApp stops .and. CloneApp node == GrpApps node,
Then move GrpApps to other node


Since I'm still a rookie with how to implement the XML rules, I have the
following two questions for the resource location constraint:

1). What syntax would I use to check that the CloneApp resource has stopped
2). How can I check that the CloneApp that stopped is on the same node as
the GrpApps?


If you can give me a simple example or point me in the right direction, it
would be greatly appreciated.

Thanks,
Bill Phillips

---------------------
This e-mail (including any attachments) is intended only for the use of the
individual or entity named above and may contain privileged, proprietary, or
confidential information. The information may also contain technical data
subject to export control laws.
---------------------
Attachments: smime.p7s (4.86 KB)


andrew at beekhof

Aug 27, 2010, 7:05 AM

Post #2 of 3 (237 views)
Permalink
Re: Help with recource location constraint [In reply to]

On Mon, Aug 23, 2010 at 2:01 PM, Phillips, William G (BPHILLIP)
<BPHILLIP [at] arinc> wrote:
> Hi,
>
> I'm running Pacemaker 0.6 two-node active/passive cluster (plan to migrate
> to latest in the next couple of months when my management will allow it). I
> have a group resource that runs on the active node and a clone resource that
> runs on both nodes. I'm using OCF resource agents. I want to implement the
> following location constraint assuming I have Group Resource "GrpApps" and
> Clone Resource "CloneApp":
>
> If CloneApp stops .and. CloneApp node == GrpApps node,
> Then move GrpApps to other node
>
>
> Since I'm still a rookie with how to implement the XML rules, I have the
> following two questions for the resource location constraint:
>
> 1). What syntax would I use to check that the CloneApp resource has stopped
> 2). How can I check that the CloneApp that stopped is on the same node as
> the GrpApps?

You can't really write rules like that.
What you would do with 1.0 is create a colocation rule between the
clone (with-rsc) and the group (rsc).

That may or may not work with 0.6 (I dont recall if it was implemented
back then) and the syntax is probably different.

>
>
> If you can give me a simple example or point me in the right direction, it
> would be greatly appreciated.
>
> Thanks,
> Bill Phillips
>
> ---------------------
> This e-mail (including any attachments) is intended only for the use of the
> individual or entity named above and may contain privileged, proprietary, or
> confidential information.  The information may also contain technical data
> subject to export control laws.
> ---------------------
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


andrew at beekhof

Sep 13, 2010, 6:13 AM

Post #3 of 3 (191 views)
Permalink
Re: Help with recource location constraint [In reply to]

On Fri, Sep 10, 2010 at 12:48 AM, Phillips, William G (BPHILLIP)
<BPHILLIP [at] arinc> wrote:
> Hi,
>
> I'm running a Pacemaker 0.6 two-node active/passive cluster (plan to migrate
> to latest in the next couple of months when my management will allow it). I
> have a group resource that runs on the active node and a clone resource that
> runs on both nodes. I'm using OCF resource agents. I want to implement the
> following location constraint assuming I have Group Resource "GrpApps"
> running on the active node and Clone Resource "CloneApp":
>
> If CloneApp stops .and. CloneApp node == GrpApps node, Then move GrpApps to
> other node

You'll need to colocate GrpApps with CloneApp. Not sure about the
syntax of colocation constraints in 0.6 anymore though.

> I've tried a rsc_location constraint of the following form:
>
> <rsc_location id="move-apps-grp-CloneApp:0-failure" rsc="GrpApps">
>   <rule id="CloneApp:0-failure-rule" score="-INFINITY" boolean_op="and">
>      <expression id="CloneApp:0-failure-check"
> attribute="fail-count-CloneApp:0" operation="gt" value="0"/>
>      <expression id="CloneApp:0-on-primary-check" attribute="#uname"
> operation="eq" value="node1"/>
>   </rule>
> </rsc_location>
>
> There's similar rsc_location constraints for the CloneApp:1 version of the
> clone and for the other node. Also, I reset the failcount for the CloneApp
> resource on restart.
>
> This rsc_location constraint works but when the location constraint
> executes, I've now restricted my GrpApps resource from running on node1. I
> haven't been able to figure out a way to reset the GrpApps resource to allow
> it to run on node1 again. I tried using the 'crm_resource -U -r "GrpApps"'
> command in the start section of the CloneApps OCF script, but that didn't do
> anything.
>
> Any ideas on how I can resolve the restriction to allow GrpApps to run on
> node1 again? Is there a better way to setup the rsc_location constraint I'm
> trying to use?
>
> Any ideas or point me in the right direction, it would be greatly
> appreciated.
>
> Thanks,
> Bill Phillips
>
> ---------------------
> This e-mail (including any attachments) is intended only for the use of the
> individual or entity named above and may contain privileged, proprietary, or
> confidential information.  The information may also contain technical data
> subject to export control laws.
> ---------------------
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Linux-HA users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.