Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-12-01 Thread Ken Gaillot
On 12/01/2016 06:04 AM, Kostiantyn Ponomarenko wrote: > OK, now I see. I still have a few questions. > 1. Is there a good reason to not remove the attribute totally if it > is "deleted"? We do this for two reasons: 1. You can "delete" an attribute for just one node, while leaving it on other

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-12-01 Thread Kostiantyn Ponomarenko
OK, now I see. I still have a few questions. 1. Is there a good reason to not remove the attribute totally if it is "deleted"? 2. Does "attrd_updater" sets attributes to "status" configuration section only? 3. Do I need to modify/set "--delay" to 0 before removing or changing the

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-30 Thread Ken Gaillot
On 11/30/2016 11:31 AM, Kostiantyn Ponomarenko wrote: > Hi Ken, > > I didn't look into the logs, but I experimented with it for a while. > Here is what I found. > > It worked for you because this attribute - "my-attr" - has not ever been > set before in that cluster. > > So if you set an

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-30 Thread Kostiantyn Ponomarenko
>> Moreover, when you delete this attribute the actual remove will be delayed by that "--delay" which was used when the attribute was set. I wasn't clear here. The behavior described in this line happens only when "dampening" has worked out during the attribute set-up. Thank you, Kostia On Wed,

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-30 Thread Kostiantyn Ponomarenko
Hi Ken, I didn't look into the logs, but I experimented with it for a while. Here is what I found. It worked for you because this attribute - "my-attr" - has not ever been set before in that cluster. So if you set an attribute, then remove it, and then set it with "--delay", like: #

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-28 Thread Ken Gaillot
On 11/23/2016 11:27 AM, Kostiantyn Ponomarenko wrote: > Maybe I am doing something wrong, but I cannot set "status" section node > attributes to a shadow cib, cluster applies them immediately. > To try it out I do in a console: > > crm_shadow --create test > crm_attribute --type nodes

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-24 Thread Kostiantyn Ponomarenko
Attribute dampening doesn't work for me also. To test that I have a script: attrd_updater -N node-0 -n my-attr --update false --delay 20 sleep 3 attrd_updater -N node-0 -n my-attr --update true sleep 7 attrd_updater -N node-1 -n my-attr --update true All my resources have

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-23 Thread Kostiantyn Ponomarenko
Maybe I am doing something wrong, but I cannot set "status" section node attributes to a shadow cib, cluster applies them immediately. To try it out I do in a console: crm_shadow --create test crm_attribute --type nodes --node node-0 --name my-attribute --update 1 --lifetime=reboot And

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-22 Thread Kostiantyn Ponomarenko
Ken, Thank you for the explanation. I will try this low-level way of shadow cib creation tomorrow. PS: I will sleep much better with this excellent news/idea. =) Thank you, Kostia On Tue, Nov 22, 2016 at 10:53 PM, Ken Gaillot wrote: > On 11/22/2016 04:39 AM, Kostiantyn

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-22 Thread Ken Gaillot
On 11/22/2016 04:39 AM, Kostiantyn Ponomarenko wrote: > Using "shadow cib" in crmsh looks like a good idea, but it doesn't work > with node attributes set into "status" section of Pacemaker config. > I wonder it it is possible to make it work that way. Forgot to mention -- the shadow CIB is

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-22 Thread Ken Gaillot
On 11/22/2016 04:39 AM, Kostiantyn Ponomarenko wrote: > Using "shadow cib" in crmsh looks like a good idea, but it doesn't work > with node attributes set into "status" section of Pacemaker config. > I wonder it it is possible to make it work that way. > > Ken, >>> start dampening timer > Could

Re: [ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-22 Thread Kostiantyn Ponomarenko
Using "shadow cib" in crmsh looks like a good idea, but it doesn't work with node attributes set into "status" section of Pacemaker config. I wonder it it is possible to make it work that way. Ken, >> start dampening timer Could you please elaborate more on this. I don't get how I can set this

[ClusterLabs] Antw: Re: Set a node attribute for multiple nodes with one command

2016-11-20 Thread Ulrich Windl
>>> Ken Gaillot schrieb am 18.11.2016 um 16:17 in >>> Nachricht : > On 11/18/2016 08:55 AM, Kostiantyn Ponomarenko wrote: >> Hi folks, >> >> Is there a way to set a node attribute to the "status" section for few >> nodes at