Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Question - Does cookbook support rolling restarts? #315
If you make a change to the config files, it notifies the elasticsearch service to restart.
Unless I'm mistaken, doesn't that have the possibility to take the entire cluster down? Elasticsearch restarts can take a while due to rebalancing and replication. If other nodes in the cluster start their converge before shards are fully replicated, bad things could happen.
I'm new to chef, so maybe there is something that I"m not seeing.
For reference, here is how the kafka cookbook handles rolling restarts.
From what I'm reading, the kafka cookbook simply provides hooks for downstream users to provide an implementation for a condition to inhibit a restart (such as requiring a minimum number of nodes to be available). It doesn't actually have the rolling restart functionality built in.
Thanks for responding.
So in practice, what will happen if I make a change to a parameter that modifies the elasticsearch.yaml, and then all nodes receive the notice to restart the service at once?
I'm upgrading this weekend. I'm thinking that I will disable rebalancing;
then stop the chef client on all nodes, then do a converge one node at a time to allow for the restart and rebalancing. Is that what you do?
I see two parameters. For posterity, It looks like the first one is the one you are refering to. The second one prevents ES from restarting when a new node joins the cluster.
default.elasticsearch[:skip_restart] = false
node.set['elasticsearch']['skip_restart'] = true
I'm going to set that first value.