A graceful way to update/upgrade/restart

I wish to automate my (minor) upgrade/restart scripts for my ES cluster.
I know that this is only applicable for upgrades like going from 0.20.4 to
0.20.5 and I have read through DrTech's excellent posthttp://elasticsearch-users.115913.n3.nabble.com/SImple-question-Is-elasticsearch-production-use-ready-td3430946.html#a3453676on this exact topic.

I want to know more about the Shutdown APIhttp://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown.html,
and have read through some other answers discussing its use.
From what I understand, shards located on the deactivated node are
reallocated to the remaining nodes in the cluster.

However, is this Shutdown API graceful? Does it just drop all connections
to said node, or does it block future HTTP connections and drain the
existing ones (like what one might expect from, say, CouchDB).
Additionally, is there any way to restart from the Shutdown API, or would I
be needing to ssh into said machine and re-run service elasticsearch start (from the servicewrapper plugin)

Thanks for your time,
Steven

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I'm looking exactly for this. Any success with this yet?

On Saturday, March 2, 2013 1:15:28 AM UTC+5:30, sr-ix wrote:

I wish to automate my (minor) upgrade/restart scripts for my ES cluster.
I know that this is only applicable for upgrades like going from 0.20.4 to
0.20.5 and I have read through DrTech's excellent posthttp://elasticsearch-users.115913.n3.nabble.com/SImple-question-Is-elasticsearch-production-use-ready-td3430946.html#a3453676on this exact topic.

I want to know more about the Shutdown APIhttp://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown.html,
and have read through some other answers discussing its use.
From what I understand, shards located on the deactivated node are
reallocated to the remaining nodes in the cluster.

However, is this Shutdown API graceful? Does it just drop all connections
to said node, or does it block future HTTP connections and drain the
existing ones (like what one might expect from, say, CouchDB).
Additionally, is there any way to restart from the Shutdown API, or would
I be needing to ssh into said machine and re-run service elasticsearch start (from the servicewrapper plugin)

Thanks for your time,
Steven

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

As long as you have replicas, the node shutdown operation, when issued
one by one and waiting for a green state, is graceful from the cluster's
point of view. Note, it is not graceful for clients, they have to manage
failover to another node for themselves. They will see connection
failures if the node they talk to is being shut down.

There is a restart method in the Shutdown API (here, the REST version)

curl -XPOST /_cluster/nodes/_restart

curl -XPOST /_cluster/nodes/{nodeId}/_restart

which might be handy in a few cases, e.g. for reloading updated plugins
without service interruption.

If you control ES from the service wrapper, you should stop/restart a
node from there.

Jörg

Am 01.03.13 20:45, schrieb sr-ix:

However, is this Shutdown API graceful? Does it just drop all
connections to said node, or does it block future HTTP connections and
drain the existing ones (like what one might expect from, say, CouchDB).
Additionally, is there any way to restart from the Shutdown API, or
would I be needing to ssh into said machine and re-run service elasticsearch start (from the servicewrapper plugin)

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

If you place Elasticsearch behind a load-balancer, the cluster maintenance
can be made fully transparent to clients:

  1. Add node IP to cluster exclude list
  2. Configure load-balancer to drain the node, allowing existing connections
    to finish
  3. When the load-balancer shows zero connections and the cluster has
    relocated all the shards on the node, shut it down
  4. After starting the node back up and confirming that it is valid, remove
    the node IP from the cluster exclude list and enable it on the load-balancer

-Pradeep

On Friday, May 17, 2013 7:35:25 AM UTC-7, Jörg Prante wrote:

As long as you have replicas, the node shutdown operation, when issued
one by one and waiting for a green state, is graceful from the cluster's
point of view. Note, it is not graceful for clients, they have to manage
failover to another node for themselves. They will see connection
failures if the node they talk to is being shut down.

There is a restart method in the Shutdown API (here, the REST version)

curl -XPOST /_cluster/nodes/_restart

curl -XPOST /_cluster/nodes/{nodeId}/_restart

which might be handy in a few cases, e.g. for reloading updated plugins
without service interruption.

If you control ES from the service wrapper, you should stop/restart a
node from there.

Jörg

Am 01.03.13 20:45, schrieb sr-ix:

However, is this Shutdown API graceful? Does it just drop all
connections to said node, or does it block future HTTP connections and
drain the existing ones (like what one might expect from, say, CouchDB).
Additionally, is there any way to restart from the Shutdown API, or
would I be needing to ssh into said machine and re-run service elasticsearch start (from the servicewrapper plugin)

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.