Re: [ClusterLabs] Coming in Pacemaker 1.1.17: start a node in standby

2017-04-27 Thread Jehan-Guillaume de Rorthais
On Thu, 27 Apr 2017 16:07:11 +0200
Lars Ellenberg  wrote:

> On Thu, Apr 27, 2017 at 09:19:55AM +0200, Jehan-Guillaume de Rorthais wrote:
> > > > > I seem to remember that at some deployment,
> > > > > we set the node instance attribute standby=on, always,
> > > > > and took it out of standby using the node_state
> > > > > transient_attribute :-)
> > > > > 
> > > > > As in
> > > > > # crm node standby ava  
> 
> > > > > # crm node status-attr ava set standby off  
> 
> > > Well, you want the "persistent" setting "on",
> > > and override it with a "transient" setting "off".  
> 
> > Quick questions:
> > 
> >   * is it what happen in the CIB when you call crm_standby?  
> 
> crm_standby --node emma --lifetime reboot --update off
> crm_standby --node emma --lifetime forever --update on
> 
> (or -n -l -v,
> default node is current node,
> default lifetime is forever)
> 
> >   * is it possible to do the opposite? persistent setting "off" and
> > override it with the transient setting?  
> 
> see above, also man crm_standby,
> which again is only a wrapper around crm_attribute.

Thank you!

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Coming in Pacemaker 1.1.17: start a node in standby

2017-04-27 Thread Lars Ellenberg
On Thu, Apr 27, 2017 at 09:19:55AM +0200, Jehan-Guillaume de Rorthais wrote:
> > > > I seem to remember that at some deployment,
> > > > we set the node instance attribute standby=on, always,
> > > > and took it out of standby using the node_state transient_attribute :-)
> > > > 
> > > > As in
> > > > # crm node standby ava

> > > > # crm node status-attr ava set standby off

> > Well, you want the "persistent" setting "on",
> > and override it with a "transient" setting "off".

> Quick questions:
> 
>   * is it what happen in the CIB when you call crm_standby?

crm_standby --node emma --lifetime reboot --update off
crm_standby --node emma --lifetime forever --update on

(or -n -l -v,
default node is current node,
default lifetime is forever)

>   * is it possible to do the opposite? persistent setting "off" and override 
> it
> with the transient setting?

see above, also man crm_standby,
which again is only a wrapper around crm_attribute.

-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R, Integration, Ops, Consulting, Support

DRBD® and LINBIT® are registered trademarks of LINBIT

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Coming in Pacemaker 1.1.17: start a node in standby

2017-04-27 Thread Jehan-Guillaume de Rorthais
On Tue, 25 Apr 2017 10:33:13 +0200
Lars Ellenberg  wrote:

> On Tue, Apr 25, 2017 at 10:27:43AM +0200, Jehan-Guillaume de Rorthais wrote:
> > On Tue, 25 Apr 2017 10:02:21 +0200
> > Lars Ellenberg  wrote:
> >   
> > > On Mon, Apr 24, 2017 at 03:08:55PM -0500, Ken Gaillot wrote:  
> > > > Hi all,
> > > > 
> > > > Pacemaker 1.1.17 will have a feature that people have occasionally asked
> > > > for in the past: the ability to start a node in standby mode.
> > > 
> > > 
> > > I seem to remember that at some deployment,
> > > we set the node instance attribute standby=on, always,
> > > and took it out of standby using the node_state transient_attribute :-)
> > > 
> > > As in
> > > # crm node standby ava
> > >   
> > > 
> > >   
> > >   ...
> > > 
> > >   
> > >   ...  
> > 
> > This solution seems much more elegant and obvious to me. A cli
> > (crm_standby?) interface would be ideal.
> > 
> > It feels weird to mix setup interfaces (through crm_standby or through the
> > config file) to manipulate the same node attribute. Isn't it possible to set
> > the standby instance attribute of a node **before** it is added to the
> > cluster? 
> > > # crm node status-attr ava set standby off
> > >> > crm-debug-origin="do_update_resource" join="member" expected="member"> ...
> > > 
> > >   
> > >   ...
> > > 
> > >   
> > > 
> > > 
> > 
> > It is not really straight forward to understand why you need to edit a
> > second different nvpair to exit the standby mode... :/  
> 
> Well, you want the "persistent" setting "on",
> and override it with a "transient" setting "off".

Quick questions:

  * is it what happen in the CIB when you call crm_standby?
  * is it possible to do the opposite? persistent setting "off" and override it
with the transient setting?

> That's how to do it in pacemaker.

OK

> But yes, what exactly has ever been "obvious" in pacemaker,
> before you knew?  :-)(or HA in general, to be fair)

Sure, the more I dig, the more I learn about it...


___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Coming in Pacemaker 1.1.17: start a node in standby

2017-04-25 Thread Lars Ellenberg
On Tue, Apr 25, 2017 at 10:27:43AM +0200, Jehan-Guillaume de Rorthais wrote:
> On Tue, 25 Apr 2017 10:02:21 +0200
> Lars Ellenberg  wrote:
> 
> > On Mon, Apr 24, 2017 at 03:08:55PM -0500, Ken Gaillot wrote:
> > > Hi all,
> > > 
> > > Pacemaker 1.1.17 will have a feature that people have occasionally asked
> > > for in the past: the ability to start a node in standby mode.  
> > 
> > 
> > I seem to remember that at some deployment,
> > we set the node instance attribute standby=on, always,
> > and took it out of standby using the node_state transient_attribute :-)
> > 
> > As in
> > # crm node standby ava
> >   
> > 
> >   
> >   ...
> > 
> >   
> >   ...
> 
> This solution seems much more elegant and obvious to me. A cli
> (crm_standby?) interface would be ideal.
> 
> It feels weird to mix setup interfaces (through crm_standby or through the
> config file) to manipulate the same node attribute. Isn't it possible to set
> the standby instance attribute of a node **before** it is added to the 
> cluster?
> 
> > # crm node status-attr ava set standby off
> >> crm-debug-origin="do_update_resource" join="member" expected="member"> ...
> > 
> >   
> > ...
> > 
> >   
> > 
> >   
> 
> It is not really straight forward to understand why you need to edit a second
> different nvpair to exit the standby mode... :/

Well, you want the "persistent" setting "on",
and override it with a "transient" setting "off".

That's how to do it in pacemaker.

But yes, what exactly has ever been "obvious" in pacemaker,
before you knew?  :-)(or HA in general, to be fair)

-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R, Integration, Ops, Consulting, Support

DRBD® and LINBIT® are registered trademarks of LINBIT

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Coming in Pacemaker 1.1.17: start a node in standby

2017-04-25 Thread Jehan-Guillaume de Rorthais
On Tue, 25 Apr 2017 10:02:21 +0200
Lars Ellenberg  wrote:

> On Mon, Apr 24, 2017 at 03:08:55PM -0500, Ken Gaillot wrote:
> > Hi all,
> > 
> > Pacemaker 1.1.17 will have a feature that people have occasionally asked
> > for in the past: the ability to start a node in standby mode.  
> 
> 
> I seem to remember that at some deployment,
> we set the node instance attribute standby=on, always,
> and took it out of standby using the node_state transient_attribute :-)
> 
> As in
> # crm node standby ava
>   
> 
>   
>   ...
> 
>   
>   ...

This solution seems much more elegant and obvious to me. A cli
(crm_standby?) interface would be ideal.

It feels weird to mix setup interfaces (through crm_standby or through the
config file) to manipulate the same node attribute. Isn't it possible to set
the standby instance attribute of a node **before** it is added to the cluster?

> # crm node status-attr ava set standby off
>crm-debug-origin="do_update_resource" join="member" expected="member"> ...
> 
>   
>   ...
> 
>   
> 
>   

It is not really straight forward to understand why you need to edit a second
different nvpair to exit the standby mode... :/


___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Coming in Pacemaker 1.1.17: start a node in standby

2017-04-25 Thread Lars Ellenberg
On Mon, Apr 24, 2017 at 03:08:55PM -0500, Ken Gaillot wrote:
> Hi all,
> 
> Pacemaker 1.1.17 will have a feature that people have occasionally asked
> for in the past: the ability to start a node in standby mode.


I seem to remember that at some deployment,
we set the node instance attribute standby=on, always,
and took it out of standby using the node_state transient_attribute :-)

As in
# crm node standby ava
  

  
  ...

  
  ...

# crm node status-attr ava set standby off
  
...

  
...

  

  

Seemed to work good enough at the time.

Though that may have been an un-intentional side-effect
of checking both sets of attributes?

-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R, Integration, Ops, Consulting, Support

DRBD® and LINBIT® are registered trademarks of LINBIT

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] Coming in Pacemaker 1.1.17: start a node in standby

2017-04-25 Thread Kristoffer Grönlund
Ken Gaillot  writes:

> Hi all,
>
> Pacemaker 1.1.17 will have a feature that people have occasionally asked
> for in the past: the ability to start a node in standby mode.
>
> It will be controlled by an environment variable (set in
> /etc/sysconfig/pacemaker, /etc/default/pacemaker, or wherever your
> distro puts them):
>
>
> # By default, nodes will join the cluster in an online state when they first
> # start, unless they were previously put into standby mode. If this
> variable is
> # set to "standby" or "online", it will force this node to join in the
> # specified state when starting.
> # (experimental; currently ignored for Pacemaker Remote nodes)
> # PCMK_node_start_state=default
>
>
> As described, it will be considered experimental in this release, mainly
> because it doesn't work with Pacemaker Remote nodes yet. However, I
> don't expect any problems using it with cluster nodes.
>
> Example use cases:
>
> You want want fenced nodes to automatically start the cluster after a
> reboot, so they contribute to quorum, but not run any resources, so the
> problem can be investigated. You would leave
> PCMK_node_start_state=standby permanently.
>
> You want to ensure a newly added node joins the cluster without problems
> before allowing it to run resources. You would set this to "standby"
> when deploying the node, and remove the setting once you're satisfied
> with the node, so it can run resources at future reboots.
>
> You want a standby setting to last only until the next boot. You would
> set this permanently to "online", and any manual setting of standby mode
> would be overwritten at the next boot.
>
> Many thanks to developers Alexandra Zhuravleva and Sergey Mishin, who
> contributed this feature as part of a project with EMC.

One of those features that seem obvious in retrospect. Great addition,
thanks to everyone involved!

Cheers,
Kristoffer

> -- 
> Ken Gaillot 
>
> ___
> Users mailing list: Users@clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>

-- 
// Kristoffer Grönlund
// kgronl...@suse.com

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] Coming in Pacemaker 1.1.17: start a node in standby

2017-04-24 Thread Ken Gaillot
Hi all,

Pacemaker 1.1.17 will have a feature that people have occasionally asked
for in the past: the ability to start a node in standby mode.

It will be controlled by an environment variable (set in
/etc/sysconfig/pacemaker, /etc/default/pacemaker, or wherever your
distro puts them):


# By default, nodes will join the cluster in an online state when they first
# start, unless they were previously put into standby mode. If this
variable is
# set to "standby" or "online", it will force this node to join in the
# specified state when starting.
# (experimental; currently ignored for Pacemaker Remote nodes)
# PCMK_node_start_state=default


As described, it will be considered experimental in this release, mainly
because it doesn't work with Pacemaker Remote nodes yet. However, I
don't expect any problems using it with cluster nodes.

Example use cases:

You want want fenced nodes to automatically start the cluster after a
reboot, so they contribute to quorum, but not run any resources, so the
problem can be investigated. You would leave
PCMK_node_start_state=standby permanently.

You want to ensure a newly added node joins the cluster without problems
before allowing it to run resources. You would set this to "standby"
when deploying the node, and remove the setting once you're satisfied
with the node, so it can run resources at future reboots.

You want a standby setting to last only until the next boot. You would
set this permanently to "online", and any manual setting of standby mode
would be overwritten at the next boot.

Many thanks to developers Alexandra Zhuravleva and Sergey Mishin, who
contributed this feature as part of a project with EMC.
-- 
Ken Gaillot 

___
Users mailing list: Users@clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org