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 &quot;type&quot; for state 
> &quot;normal&quot;.</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>&nbsp;</div>
> 
> <div>CIB output from Pacemaker 1.1.8</div>
> 
> <div>
> <div>&nbsp;&nbsp;&nbsp; &lt;nodes&gt;<br/>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;node id=&quot;int2node1&quot; 
> uname=&quot;int2node1&quot;&gt;
> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;instance_attributes 
> id=&quot;nodes-int2node1&quot;&gt;<br/>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;nvpair 
> id=&quot;nodes-int2node1-standby&quot; name=&quot;standby&quot; 
> value=&quot;off&quot;/&gt;</div>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/node&gt;<br/>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;node id=&quot;int2node2&quot; 
> uname=&quot;int2node2&quot;&gt;
> <div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;instance_attributes 
> id=&quot;nodes-int2node2&quot;&gt;<br/>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;nvpair 
> id=&quot;nodes-int2node2-standby&quot; name=&quot;standby&quot; 
> value=&quot;on&quot;/&gt;</div>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/node&gt;<br/>
> &nbsp;&nbsp;&nbsp; &lt;/nodes&gt;</div>
> 
> <div><br/>
> CIB output from Pacemaker 1.1.7</div>
> 
> <div>
> <div>&nbsp;&nbsp;&nbsp; &lt;nodes&gt;<br/>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;node id=&quot;int1node1&quot; 
> type=&quot;normal&quot; uname=&quot;int1node1&quot;&gt;<br/>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/node&gt;<br/>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;node id=&quot;int1node2&quot; 
> type=&quot;normal&quot; uname=&quot;int1node2&quot;&gt;<br/>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/node&gt;<br/>
> &nbsp;&nbsp;&nbsp; &lt;/nodes&gt;</div>
> 
> <div>&nbsp;</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>&nbsp;
> <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>&nbsp;Mittwoch, 15. Mai 2013 
> um 21:31 Uhr<br/>
> <b>Von:</b>&nbsp;&quot;Lars Ellenberg&quot; 
> &lt;lars.ellenb...@linbit.com&gt;<br/>
> <b>An:</b>&nbsp;pacemaker@oss.clusterlabs.org<br/>
> <b>Betreff:</b>&nbsp;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/>
> &gt; On Tue, May 14, 2013 at 10:03:59PM +0200, Lars Ellenberg wrote:<br/>
> &gt; &gt; On Tue, May 14, 2013 at 09:59:50PM +0200, Lars Ellenberg wrote:<br/>
> &gt; &gt; &gt; On Mon, May 13, 2013 at 01:53:11PM +0200, Michael 
> Schwartzkopff wrote:<br/>
> &gt; &gt; &gt; &gt; Hi,<br/>
> &gt; &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; &gt; crm tells me it is version 1.2.4<br/>
> &gt; &gt; &gt; &gt; pacemaker tell me it is verison 1.1.9<br/>
> &gt; &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; &gt; So it should work since incompatibilities are resolved in 
> crm higher that<br/>
> &gt; &gt; &gt; &gt; version 1.2.1. Anywas crm tells me nonsense:<br/>
> &gt; &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; &gt; # crm<br/>
> &gt; &gt; &gt; &gt; crm(live)# node<br/>
> &gt; &gt; &gt; &gt; crm(live)node# standby node1<br/>
> &gt; &gt; &gt; &gt; ERROR: bad lifetime: node1<br/>
> &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; Your node is not named node1.<br/>
> &gt; &gt; &gt; check: crm node list<br/>
> &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; Maybe a typo, maybe some case-is-significant nonsense,<br/>
> &gt; &gt; &gt; maybe you just forgot to use the fqdn.<br/>
> &gt; &gt; &gt; maybe the check for &quot;is this a known node name&quot; is 
> (now) broken?<br/>
> &gt; &gt; &gt;<br/>
> &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; standby with just one argument checks if that argument<br/>
> &gt; &gt; &gt; happens to be a known node name,<br/>
> &gt; &gt; &gt; and assumes that if it is not,<br/>
> &gt; &gt; &gt; it &quot;has to be&quot; a lifetime,<br/>
> &gt; &gt; &gt; and the current node is used as node name...<br/>
> &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; Maybe we should invert that logic, and instead compare the 
> single<br/>
> &gt; &gt; &gt; argument against allowed lifetime values (reboot, forever), 
> and assume<br/>
> &gt; &gt; &gt; it is supposed to be a node name otherwise?<br/>
> &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; Then the error would become<br/>
> &gt; &gt; &gt; ERROR: unknown node name: node1<br/>
> &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; Which is probably more useful most of the time.<br/>
> &gt; &gt; &gt;<br/>
> &gt; &gt; &gt; Dejan?<br/>
> &gt; &gt;<br/>
> &gt; &gt; Something like this maybe:<br/>
> &gt; &gt;<br/>
> &gt; &gt; diff --git a/modules/ui.py.in b/modules/ui.py.in<br/>
> &gt; &gt; --- a/modules/ui.py.in<br/>
> &gt; &gt; +++ b/modules/ui.py.in<br/>
> &gt; &gt; @@ -1185,7 +1185,7 @@ class NodeMgmt(UserInterface):<br/>
> &gt; &gt; if not args:<br/>
> &gt; &gt; node = vars.this_node<br/>
> &gt; &gt; if len(args) == 1:<br/>
> &gt; &gt; - if not args[0] in listnodes():<br/>
> &gt; &gt; + if args[0] in (&quot;reboot&quot;, &quot;forever&quot;):<br/>
> &gt;<br/>
> &gt; Yes, I wanted to look at it again. Another complication is that<br/>
> &gt; 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,&quot;reboot&quot;,&quot;forever&quot;):<br/>
> common_err(&quot;bad lifetime: %s&quot; % lifetime)<br/>
> return False<br/>
> <br/>
> --<br/>
> : Lars Ellenberg<br/>
> : LINBIT &#124; 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@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@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


_______________________________________________
Pacemaker mailing list: Pacemaker@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

Reply via email to