<div dir="ltr">Ken,<div>Thank you for the explanation.</div><div>I will try this low-level way of shadow cib creation tomorrow.</div><div>PS: I will sleep much better with this excellent news/idea. =)</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Thank you,<div>Kostia</div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Nov 22, 2016 at 10:53 PM, Ken Gaillot <span dir="ltr">&lt;<a href="mailto:kgaillot@redhat.com" target="_blank">kgaillot@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 11/22/2016 04:39 AM, Kostiantyn Ponomarenko wrote:<br>
</span><span class="">&gt; Using &quot;shadow cib&quot; in crmsh looks like a good idea, but it doesn&#39;t work<br>
&gt; with node attributes set into &quot;status&quot; section of Pacemaker config.<br>
&gt; I wonder it it is possible to make it work that way.<br>
<br>
</span>Forgot to mention -- the shadow CIB is probably the best way to do this.<br>
I don&#39;t know if there&#39;s a way to do it in crmsh, but you can use it with<br>
the low-level commands crm_shadow and crm_attribute --lifetime=reboot.<br>
<span class=""><br>
&gt; Ken,<br>
&gt;&gt;&gt; start dampening timer<br>
&gt; Could you please elaborate more on this. I don&#39;t get how I can set this<br>
&gt; timer.<br>
&gt; Do I need to set this timer for each node?<br>
&gt;<br>
&gt;<br>
&gt; Thank you,<br>
&gt; Kostia<br>
&gt;<br>
&gt; On Mon, Nov 21, 2016 at 9:30 AM, Ulrich Windl<br>
&gt; &lt;<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-<wbr>regensburg.de</a><br>
</span>&gt; &lt;mailto:<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de">Ulrich.Windl@rz.uni-<wbr>regensburg.de</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     &gt;&gt;&gt; Ken Gaillot &lt;<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a> &lt;mailto:<a href="mailto:kgaillot@redhat.com">kgaillot@redhat.com</a>&gt;&gt;<br>
<span class="">&gt;     schrieb am 18.11.2016 um 16:17 in Nachricht<br>
&gt;     &lt;<a href="mailto:d6f449da-64f8-12ad-00be-e772d8e382ca@redhat.com">d6f449da-64f8-12ad-00be-<wbr>e772d8e382ca@redhat.com</a><br>
</span>&gt;     &lt;mailto:<a href="mailto:d6f449da-64f8-12ad-00be-e772d8e382ca@redhat.com">d6f449da-64f8-12ad-<wbr>00be-e772d8e382ca@redhat.com</a>&gt;&gt;<wbr>:<br>
<div class="HOEnZb"><div class="h5">&gt;     &gt; On 11/18/2016 08:55 AM, Kostiantyn Ponomarenko wrote:<br>
&gt;     &gt;&gt; Hi folks,<br>
&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; Is there a way to set a node attribute to the &quot;status&quot; section for few<br>
&gt;     &gt;&gt; nodes at the same time?<br>
&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; In my case there is a node attribute which allows some resources to<br>
&gt;     &gt;&gt; start in the cluster if it is set.<br>
&gt;     &gt;&gt; If I set this node attribute for say two nodes in a way - one and then<br>
&gt;     &gt;&gt; another, than these resources are not distributed equally between these<br>
&gt;     &gt;&gt; two nodes. That because Pacemaker picks the first node to with this<br>
&gt;     &gt;&gt; attribute is set and immediately starts all allowed resources on it. And<br>
&gt;     &gt;&gt; this is not the behavior i would like to get.<br>
&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; Thank you,<br>
&gt;     &gt;&gt; Kostia<br>
&gt;     &gt;<br>
&gt;     &gt; Not that I know of, but it would be a good feature to add to<br>
&gt;     &gt; attrd_updater and/or crm_attribute.<br>
&gt;<br>
&gt;     With crm (shell) you don&#39;t have transactions for node attributes,<br>
&gt;     but for the configuration. So if you add a location restriction<br>
&gt;     preventing any resources on your nodes, then enable the nodes, and<br>
&gt;     then delete the location restrictions in one transaction, you might<br>
&gt;     get what you want. It&#39;s not elegant, but itt ill do.<br>
&gt;<br>
&gt;     To the crm shell maintainer: Is is difficult to build transactions<br>
&gt;     to node status changes? The problem I see is this: For configuration<br>
&gt;     you always have transactions (requiring &quot;commit), but for nodes you<br>
&gt;     traditionally have non (effects are immediate). So you&#39;d need a<br>
&gt;     thing like &quot;start transaction&quot; which requires a &quot;commit&quot; or some<br>
&gt;     kind of abort later.<br>
&gt;<br>
&gt;     I also don&#39;t know whether a &quot;shadow CIB&quot; would help for the original<br>
&gt;     problem.<br>
&gt;<br>
&gt;     Ulrich<br>
&gt;<br>
&gt;     &gt;<br>
&gt;     &gt; You can probably hack it with a dampening value of a few seconds. If<br>
&gt;     &gt; your rule checks for a particular value of the attribute, set all the<br>
&gt;     &gt; nodes to a different value first, which will write that value and<br>
&gt;     start<br>
&gt;     &gt; the dampening timer. Then set all the attributes to the desired value,<br>
&gt;     &gt; and they will get written out together when the timer expires.<br>
</div></div></blockquote></div><br></div>