[Pacemaker] crm subshell 1.2.4 incompatible to pacemaker 1.1.9?

Dejan Muhamedagic dejanmm at fastmail.fm
Fri May 17 09:21:08 UTC 2013


Hi Rainer,

On Thu, May 16, 2013 at 06:53:24PM +0200, Rainer Brestan wrote:
> <html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
> <div>The bug is in the function is_normal_node.</div>
> 
> <div>This function checks the attribute "type" for state "normal".</div>
> 
> <div>But this attribute is not used any more.</div>

I'm very well aware of that and crmsh can deal since v1.2.5 with
both pacemaker versions.

Thanks,

Dejan

> <div> </div>
> 
> <div>CIB output from Pacemaker 1.1.8</div>
> 
> <div>
> <div>    <nodes><br/>
>       <node id="int2node1" uname="int2node1">
> <div>        <instance_attributes id="nodes-int2node1"><br/>
>           <nvpair id="nodes-int2node1-standby" name="standby" value="off"/></div>
>       </node><br/>
>       <node id="int2node2" uname="int2node2">
> <div>        <instance_attributes id="nodes-int2node2"><br/>
>           <nvpair id="nodes-int2node2-standby" name="standby" value="on"/></div>
>       </node><br/>
>     </nodes></div>
> 
> <div><br/>
> CIB output from Pacemaker 1.1.7</div>
> 
> <div>
> <div>    <nodes><br/>
>       <node id="int1node1" type="normal" uname="int1node1"><br/>
>       </node><br/>
>       <node id="int1node2" type="normal" uname="int1node2"><br/>
>       </node><br/>
>     </nodes></div>
> 
> <div> </div>
> 
> <div>Therefore, function listnodes will not return any node and function standby will use the current node as node and the first argument as lifetime.</div>
> 
> <div>In case of specified both (node and lifetime) it works because of other else path.</div>
> 
> <div>Rainer</div>
> </div>
> </div>
> 
> <div> 
> <div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
> <div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch, 15. Mai 2013 um 21:31 Uhr<br/>
> <b>Von:</b> "Lars Ellenberg" <lars.ellenberg at linbit.com><br/>
> <b>An:</b> pacemaker at oss.clusterlabs.org<br/>
> <b>Betreff:</b> Re: [Pacemaker] crm subshell 1.2.4 incompatible to pacemaker 1.1.9?</div>
> 
> <div name="quoted-content">On Wed, May 15, 2013 at 03:34:14PM +0200, Dejan Muhamedagic wrote:<br/>
> > On Tue, May 14, 2013 at 10:03:59PM +0200, Lars Ellenberg wrote:<br/>
> > > On Tue, May 14, 2013 at 09:59:50PM +0200, Lars Ellenberg wrote:<br/>
> > > > On Mon, May 13, 2013 at 01:53:11PM +0200, Michael Schwartzkopff wrote:<br/>
> > > > > Hi,<br/>
> > > > ><br/>
> > > > > crm tells me it is version 1.2.4<br/>
> > > > > pacemaker tell me it is verison 1.1.9<br/>
> > > > ><br/>
> > > > > So it should work since incompatibilities are resolved in crm higher that<br/>
> > > > > version 1.2.1. Anywas crm tells me nonsense:<br/>
> > > > ><br/>
> > > > > # crm<br/>
> > > > > crm(live)# node<br/>
> > > > > crm(live)node# standby node1<br/>
> > > > > ERROR: bad lifetime: node1<br/>
> > > ><br/>
> > > > Your node is not named node1.<br/>
> > > > check: crm node list<br/>
> > > ><br/>
> > > > Maybe a typo, maybe some case-is-significant nonsense,<br/>
> > > > maybe you just forgot to use the fqdn.<br/>
> > > > maybe the check for "is this a known node name" is (now) broken?<br/>
> > > ><br/>
> > > ><br/>
> > > > standby with just one argument checks if that argument<br/>
> > > > happens to be a known node name,<br/>
> > > > and assumes that if it is not,<br/>
> > > > it "has to be" a lifetime,<br/>
> > > > and the current node is used as node name...<br/>
> > > ><br/>
> > > > Maybe we should invert that logic, and instead compare the single<br/>
> > > > argument against allowed lifetime values (reboot, forever), and assume<br/>
> > > > it is supposed to be a node name otherwise?<br/>
> > > ><br/>
> > > > Then the error would become<br/>
> > > > ERROR: unknown node name: node1<br/>
> > > ><br/>
> > > > Which is probably more useful most of the time.<br/>
> > > ><br/>
> > > > Dejan?<br/>
> > ><br/>
> > > Something like this maybe:<br/>
> > ><br/>
> > > diff --git a/modules/ui.py.in b/modules/ui.py.in<br/>
> > > --- a/modules/ui.py.in<br/>
> > > +++ b/modules/ui.py.in<br/>
> > > @@ -1185,7 +1185,7 @@ class NodeMgmt(UserInterface):<br/>
> > > if not args:<br/>
> > > node = vars.this_node<br/>
> > > if len(args) == 1:<br/>
> > > - if not args[0] in listnodes():<br/>
> > > + if args[0] in ("reboot", "forever"):<br/>
> ><br/>
> > Yes, I wanted to look at it again. Another complication is that<br/>
> > the lifetime can be just about anything in that date ISO format.<br/>
> <br/>
> That may well be, but right now those would be rejected by crmsh<br/>
> anyways:<br/>
> <br/>
> if lifetime not in (None,"reboot","forever"):<br/>
> common_err("bad lifetime: %s" % lifetime)<br/>
> return False<br/>
> <br/>
> --<br/>
> : Lars Ellenberg<br/>
> : LINBIT | Your Way to High Availability<br/>
> : DRBD/HA support and consulting <a href="http://www.linbit.com" target="_blank">http://www.linbit.com</a><br/>
> <br/>
> _______________________________________________<br/>
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org<br/>
> <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br/>
> <br/>
> Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br/>
> Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br/>
> Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a></div>
> </div>
> </div>
> </div></div></body></html>
> 

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