Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force a new master election for rolling restart #26992

Closed
AlexWerz opened this issue Oct 12, 2017 · 3 comments
Closed

Force a new master election for rolling restart #26992

AlexWerz opened this issue Oct 12, 2017 · 3 comments

Comments

@AlexWerz
Copy link

Force a master election to eliminate downtime during rolling restart.

Whenever I need to restart a cluster I follow the rolling restart guide provided here https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html

Bascally:

  1. wait for green status
  2. Disable shard allocation
  3. restart node
  4. enable shard allocation
  5. wait for green status
  6. repeat with next node

I sort my nodes according their role and restart master nodes last. This works fine until I restart the master node. Then the cluster is not reachable anymore for like 30s. All requests to the cluster will fail. This could be prevented if I would have the possibility to change the current master before restarting it.

Thanks,
Alex

@bleskes
Copy link
Contributor

bleskes commented Oct 12, 2017

During master elections nodes will serve reads requests and indexing requests will wait (but not return) for a new master to be elected. Master election takes between 3 to 5 seconds, but it sounds like you're experiencing something else. I would suggest starting with investigating why that is (if you need help please feel free to post something on our forums at discuss.elastic.co). I'm going to close this issue for now (it has merit but there are much bigger fish to fry at the moment).

@luyuncheng
Copy link
Contributor

if there is a master leave but cluster settings not changed, what if changed the cluster block level into METADATA_WRITE?
I wonder whether a data node can continuously write (not block when new master elected) when only change the leader without metadata changed.
#17493

@DaveCTurner
Copy link
Contributor

@luyuncheng this issue was closed nearly 2 years ago, so this isn't a good place to ask a question like yours. I see you've asked the same question on another closed issue too. I recommend not doing this. If you would like to discuss your question, please open a thread on the discussion forum instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants