[Pacemaker] location setting with parenthesis

Lars Ellenberg lars.ellenberg at linbit.com
Thu Nov 3 17:10:44 EDT 2011


On Thu, Nov 03, 2011 at 09:30:45PM +0100, Andreas Kurz wrote:
> On 11/03/2011 12:38 PM, Lars Ellenberg wrote:
> > On Thu, Nov 03, 2011 at 07:23:01PM +0900, 池田 淳子 wrote:
> >> Hi,
> >>
> >>>> location rsc_location-1 msDRBD \
> >>>> rule role=master -inf: \
> >>>> (defined master-prmMySQL:0 and master-prmMySQL:0 gt 0) or \
> >>>> (defined master-prmMySQL:1 and master-prmMySQL:1 gt 0)
> >>>
> >>> Why not using two rules for this location constraint? I expect that to
> >>> work the same way you want to express in your rule above.
> >>
> >> Do you mean the following rules?
> >>
> >> location rsc_location-1 msDRBD \
> >> rule role=master -inf: defined master-prmMySQL:0 and master-prmMySQL:0 gt 0 \
> >> rule role=master -inf: defined master-prmMySQL:1 and master-prmMySQL:1 gt 0
> > 
> > I may be missing something obvious, but why not a colocation constraint
> > between msDRBD and prmMySQL?
> > 
> > something like
> > colocation asdf -inf: msDRBD:Master prmMySQL:Master
> > 
> > 
> > 
> 
> I don't think you miss something obvious, lars ;-)
> 
> yes, that constraint you recommend would be the way to go ... I was only
> commenting on the parenthesis not on the quality of the rules ;-)

Well, actually probably 

colocation asdf -inf: msDRBD:Master msMySQL:Master

assuming prmMySQL was the primitive and msMySQL the ms resource.

Anyways, variations of that theme should do fine.


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com




More information about the Pacemaker mailing list