Bird
Raised Fist0

Which command is recommended to disable shard allocation before starting a rolling upgrade?

easy📝 Syntax Q12 of Q15
Elasticsearch - Cluster Management
Which command is recommended to disable shard allocation before starting a rolling upgrade?
APUT /_cluster/settings {"persistent": {"cluster.routing.allocation.enable": "none"}}
BPOST /_cluster/disable_shards
CGET /_cluster/settings {"allocation": "disable"}
DDELETE /_cluster/shards
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct syntax to disable shard allocation

    The correct way is to update cluster settings with PUT and set allocation to "none".
  2. Step 2: Check options

    Only PUT /_cluster/settings {"persistent": {"cluster.routing.allocation.enable": "none"}} uses the correct HTTP method, endpoint, and JSON body.
  3. Final Answer:

    PUT /_cluster/settings {"persistent": {"cluster.routing.allocation.enable": "none"}} -> Option A
  4. Quick Check:

    Disable shard allocation = PUT cluster settings with allocation none [OK]
Quick Trick: Use PUT with cluster settings and allocation none to disable shards [OK]
Common Mistakes:
MISTAKES
  • Using wrong HTTP method like POST or GET
  • Wrong endpoint or missing persistent key
  • Trying to delete shards instead of disabling allocation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes