[Pacemaker] emergency pppoe connection

Dejan Muhamedagic dejanmm at fastmail.fm
Mon Oct 1 09:58:43 EDT 2012


On Mon, Oct 01, 2012 at 10:43:38AM +0000, James Harper wrote:
> > 
> > Hi,
> > 
> > On Sun, Sep 30, 2012 at 05:52:58AM +0000, James Harper wrote:
> > > >
> > > > rule ping_gw eq 0 and (#uname eq bitvs5 or #uname eq bitvs6)
> > > >
> > > > and it tells me it doesn't like "and" and "or" in the same
> > > > expression (or I think that's what it's telling me)
> > > >
> > > > any suggestions?
> > > >
> > >
> > > I think I've figured it out, I need to do it like:
> > >
> > > rule 0: ping_gw eq 0
> > > rule -inf: #uname ne node1 and #name ne node2
> > >
> > > so the first rule says the resource can run on any location if the gateway
> > can't be pinged, and the second rule says it can't run on any node except
> > node1 and node2. It's an asymmetric cluster.
> > >
> > > Is there a better way to do it?
> > 
> > If you want the resource to run only if the gateway cannot be reached I think
> > that it should be:
> > 
> > rule -inf: ping_gw gt 0 \
> > rule -inf: #uname ne node1 and #name ne node2
> > 
> 
> Isn't my way correct for the asymmetric cluster case?

Yes, missed that part :) Though in that case I'd still put a
positive score. Can't recall if the score is actually required to
be positive for assymetric clusters.

Thanks,

Dejan

> James
> 
> _______________________________________________
> 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




More information about the Pacemaker mailing list