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

No master (startup / minimum_master_node) / not recovered blocks should cause proper failures on operations #1589

Closed
erickt opened this issue Jan 5, 2012 · 0 comments

Comments

@erickt
Copy link
Contributor

erickt commented Jan 5, 2012

When there is no master node yet elected (or got into this state because of minimum master nodes), or the cluster has not recovered yet, a proper failure should be raised on all actions. Rest status code should be 503.

Original Request:

When a node in a cluster reboots, there is a brief period of time while that node is searching for a master that that node can 404, even if discovery.zen.minimum_master_nodes equals 2:

% sudo service elasticsearch restart
...
time passes
...
% curl http://localhost:9200/index/type/id
{"error":"IndexMissingException[[index] missing]","status":404}
% curl http://localhost:9200/_cluster/health
{"error" : "MasterNotDiscoveredException[]", "status" : 500}

Since this is the same error message you get when the there's actually no index, I need to check with /_cluster/health to see if the cluster is in this startup phase to tell if this is a temporary error or not. It'd be preferable if instead elasticsearch could just raise a separate error so I don't need to do that.

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

No branches or pull requests

2 participants