# How to safely apply new configuration from elasticsearch.yml

**URL:** <https://discuss.elastic.co/t/how-to-safely-apply-new-configuration-from-elasticsearch-yml/18878>\
**Category:** Elasticsearch\
**Created:** [July 24, 2014, 7:45pm UTC](https://discuss.elastic.co/t/how-to-safely-apply-new-configuration-from-elasticsearch-yml/18878 "2014-07-24T19:45:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)\
**Post date:** [July 24, 2014, 7:45pm UTC](https://discuss.elastic.co/t/how-to-safely-apply-new-configuration-from-elasticsearch-yml/18878/1 "2014-07-24T19:45:05Z")

</div>

I manage my ES cluster using Ansible. Specifically I wrote this  
role [https://github.com/LaneCommunityCollege/aspects\_elasticsearch](https://github.com/LaneCommunityCollege/aspects_elasticsearch) to do  
most of the work for me.

The issue right now is that if I make a change to my elasticsearch.yml  
configuration, Ansible automatically issues a 'service elasticsearch  
restart' command for me. Normally this isn't a issue, but when the  
configuration applies to all the nodes in my cluster, that would restart  
the entire cluster. Not really something I'd like to do very often.

Is there a command I can run that would tell ES to load the  
elasticsearch.yml configuration without shutting the node down?

Is there a command/script I could run that would check the clusters'  
status, if it is not green it would wait and check again, then when it is  
green, it would restart the node? (Writing a script to do this is my  
current plan, but I'd like to know what more experience users are doing  
first.)

I'm running ES 1.1.x on Ubuntu 12.04.

I expect that any configuration management system that deploys  
configuration to the elasticsearch.yml file and then restarts the node  
would have this same issue. So if you are configuring ES via Puppet, Chef,  
or another system, what do you do?

--  
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/81bb62ce-3fde-47af-a61e-01d6400dd83b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/81bb62ce-3fde-47af-a61e-01d6400dd83b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 24, 2014, 10:39pm UTC](https://discuss.elastic.co/t/how-to-safely-apply-new-configuration-from-elasticsearch-yml/18878/2 "2014-07-24T22:39:08Z")

</div>

The only way to load the config is with a restart of the service.  
You could use the cat API to check on the status before reloading -

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 25 July 2014 05:45, David Reagan [jerrac@gmail.com](mailto:jerrac@gmail.com) wrote:

> I manage my ES cluster using Ansible. Specifically I wrote this role  
> [GitHub - LaneCommunityCollege/aspects\_elasticsearch: Ansible role to install and configure the Elasticsearch database.](https://github.com/LaneCommunityCollege/aspects_elasticsearch) to do most  
> of the work for me.
> 
> The issue right now is that if I make a change to my elasticsearch.yml  
> configuration, Ansible automatically issues a 'service elasticsearch  
> restart' command for me. Normally this isn't a issue, but when the  
> configuration applies to all the nodes in my cluster, that would restart  
> the entire cluster. Not really something I'd like to do very often.
> 
> Is there a command I can run that would tell ES to load the  
> elasticsearch.yml configuration without shutting the node down?
> 
> Is there a command/script I could run that would check the clusters'  
> status, if it is not green it would wait and check again, then when it is  
> green, it would restart the node? (Writing a script to do this is my  
> current plan, but I'd like to know what more experience users are doing  
> first.)
> 
> I'm running ES 1.1.x on Ubuntu 12.04.
> 
> I expect that any configuration management system that deploys  
> configuration to the elasticsearch.yml file and then restarts the node  
> would have this same issue. So if you are configuring ES via Puppet, Chef,  
> or another system, what do you do?
> 
> --  
> 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/81bb62ce-3fde-47af-a61e-01d6400dd83b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/81bb62ce-3fde-47af-a61e-01d6400dd83b%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/81bb62ce-3fde-47af-a61e-01d6400dd83b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/81bb62ce-3fde-47af-a61e-01d6400dd83b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEM624Y18Wn098iO-rdQ-W16wf%3DNqmVdqqm7LmDK3ktVbMhzcw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624Y18Wn098iO-rdQ-W16wf%3DNqmVdqqm7LmDK3ktVbMhzcw%40mail.gmail.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, 1:13am UTC](https://discuss.elastic.co/t/how-to-safely-apply-new-configuration-from-elasticsearch-yml/18878/3 "2017-07-06T01:13:17Z")

</div>


