[Pacemaker] non-standby node scores

Dejan Muhamedagic dejanmm at fastmail.fm
Fri Aug 21 15:29:52 UTC 2009


On Fri, Aug 21, 2009 at 05:00:17PM +0200, Raoul Bhatia [IPAX] wrote:
> On 08/21/2009 09:07 AM, Andrew Beekhof wrote:
> > On Thu, Aug 20, 2009 at 8:18 PM, Raoul Bhatia [IPAX]<r.bhatia at ipax.at> wrote:
> >> hi,
> >>
> >> i have a node that is placed in standby mode. when i use showscores.sh,
> >> i can see that resources have a score of -1000000 (-INFINITY) for this
> >> host.
> >>
> >> is it possible to get a "if this node wasn't in standby" score for
> >> those resources?
> > 
> > sure, use the crm shell, create a shadow copy of the config, unset
> > standby, run ptest, commit shadow copy to the cluster if you're happy

Actually, it can be done without a shadow cib by just changing
the standby attribute of a node in "crm configure" then running
ptest. ptest will show you what would happen if you were to
commit the changes. The thing that's missing however is adding
options to the ptest command. Perhaps you want to open another
enhancement bugzilla for that :)

Thanks,

Dejan

> ok, what i did:
> 
> use crm to create a shadow cib
> > root at wc01 ~ # crm
> > crm(live)# node list
> > wc01(31de4ab3-2d05-476e-8f9a-627ad6cd94ca): normal
> >         standby: off
> > wc02(f36760d8-d84a-46b2-b452-4c8cac8b3396): normal
> >         standby: on
> > crm(live)# cib list
> >           
> > crm(live)# cib new raoul
> > INFO: raoul shadow CIB created
> 
> set node wc02 online and verify
> > crm(raoul)# node online wc02
> > crm(raoul)# node list
> > wc01(31de4ab3-2d05-476e-8f9a-627ad6cd94ca): normal
> >         standby: off
> > wc02(f36760d8-d84a-46b2-b452-4c8cac8b3396): normal
> >         standby: off
> 
> parse raoul.shadow
> > crm(raoul)# quit
> > bye
> > root at wc01 ~ # grep standby /var/lib/heartbeat/crm/shadow.raoul
> >           <nvpair id="standby-31de4ab3-2d05-476e-8f9a-627ad6cd94ca" name="standby" value="off"/>
> >           <nvpair name="standby" id="standby-f36760d8-d84a-46b2-b452-4c8cac8b3396" value="off"/>
> > root at wc01 ~ #  ptest -D raoul.dot -x /var/lib/heartbeat/crm/shadow.raoul
> > root at wc01 ~ # cat raoul.dot
> >  digraph "g" {
> > }
> 
> using "ptest -aD raoul.dot -x /var/lib/heartbeat/crm/shadow.raoul"
> did work though.
> 
> is this the way you meant?
> 
> thanks,
> raoul
> -- 
> ____________________________________________________________________
> DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia at ipax.at
> Technischer Leiter
> 
> IPAX - Aloy Bhatia Hava OEG         web.          http://www.ipax.at
> Barawitzkagasse 10/2/2/11           email.            office at ipax.at
> 1190 Wien                           tel.               +43 1 3670030
> FN 277995t HG Wien                  fax.            +43 1 3670030 15
> ____________________________________________________________________
> 
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker




More information about the Pacemaker mailing list