# Does wait\_for\_relocating\_shards in the cluster health api return value if waiting?

**URL:** <https://discuss.elastic.co/t/does-wait-for-relocating-shards-in-the-cluster-health-api-return-value-if-waiting/21978>\
**Category:** Elasticsearch\
**Created:** [February 4, 2015, 6:41pm UTC](https://discuss.elastic.co/t/does-wait-for-relocating-shards-in-the-cluster-health-api-return-value-if-waiting/21978 "2015-02-04T18:41:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve\_Duys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_duys/32/940_2.png) [@Steve\_Duys](https://discuss.elastic.co/u/Steve_Duys)\
**Post date:** [February 4, 2015, 6:41pm UTC](https://discuss.elastic.co/t/does-wait-for-relocating-shards-in-the-cluster-health-api-return-value-if-waiting/21978/1 "2015-02-04T18:41:01Z")

</div>

I'm writing a bash shell script to handle rolling restart for production  
cluster..

If the cluster is truly waiting on relocating shards, and I'm checking with curl  
-XGET '[http://localhost:9200/\_cluster/health?wait\_for\_relocating\_shards=yellow&timeout=50s](http://localhost:9200/_cluster/health?wait_for_relocating_shards=yellow&timeout=50s)'  
-- does it return a value or just pause for the timeout duration?

One might ask why I didn't just try.. I'm not in a maint window atm 😉

Thx,  
-Steve

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0c2720e5-9b07-4113-8aba-32f2bafd3280%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0c2720e5-9b07-4113-8aba-32f2bafd3280%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Steve\_Duys](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_duys/32/940_2.png) [@Steve\_Duys](https://discuss.elastic.co/u/Steve_Duys)\
**Post date:** [February 4, 2015, 6:43pm UTC](https://discuss.elastic.co/t/does-wait-for-relocating-shards-in-the-cluster-health-api-return-value-if-waiting/21978/2 "2015-02-04T18:43:39Z")

</div>

sorry that curl paste has a typo.. should've been: curl -XGET '  
[http://localhost:9200/\_cluster/health?wait\_for\_relocating\_shards=0&timeout=50s](http://localhost:9200/_cluster/health?wait_for_relocating_shards=0&timeout=50s)  
[http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A9200%2F\_cluster%2Fhealth%3Fwait\_for\_relocating\_shards%3Dyellow%26timeout%3D50s&sa=D&sntz=1&usg=AFQjCNEThGz4S\_gocbrmY96879F00YEmSw](http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A9200%2F_cluster%2Fhealth%3Fwait_for_relocating_shards%3Dyellow%26timeout%3D50s&sa=D&sntz=1&usg=AFQjCNEThGz4S_gocbrmY96879F00YEmSw)  
'

On Wednesday, February 4, 2015 at 1:41:01 PM UTC-5, Steve Duys wrote:

> I'm writing a bash shell script to handle rolling restart for production  
> cluster..
> 
> If the cluster is truly waiting on relocating shards, and I'm checking  
> with curl -XGET '  
> [http://localhost:9200/\_cluster/health?wait\_for\_relocating\_shards=0&timeout=50s](http://localhost:9200/_cluster/health?wait_for_relocating_shards=0&timeout=50s)  
> [http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A9200%2F\_cluster%2Fhealth%3Fwait\_for\_relocating\_shards%3Dyellow%26timeout%3D50s&sa=D&sntz=1&usg=AFQjCNEThGz4S\_gocbrmY96879F00YEmSw](http://www.google.com/url?q=http%3A%2F%2Flocalhost%3A9200%2F_cluster%2Fhealth%3Fwait_for_relocating_shards%3Dyellow%26timeout%3D50s&sa=D&sntz=1&usg=AFQjCNEThGz4S_gocbrmY96879F00YEmSw)'  
> -- does it return a value or just pause for the timeout duration?
> 
> One might ask why I didn't just try.. I'm not in a maint window atm 😉
> 
> Thx,  
> -Steve

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ef599e46-f94c-45e7-9188-368529c34648%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ef599e46-f94c-45e7-9188-368529c34648%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:34am UTC](https://discuss.elastic.co/t/does-wait-for-relocating-shards-in-the-cluster-health-api-return-value-if-waiting/21978/3 "2017-07-06T00:34:58Z")

</div>


