Skip to content

Instantly share code, notes, and snippets.

@namkyu
Last active February 6, 2018 23:39
Show Gist options
  • Save namkyu/11d261d3f92b89d048d6569d8298d41d to your computer and use it in GitHub Desktop.
Save namkyu/11d261d3f92b89d048d6569d8298d41d to your computer and use it in GitHub Desktop.
elasticsearch rolling restarts #elasticsearch

1. shard allocation 옵션을 disabled 처리

$ curl -XPUT 'localhost:9200/_cluster/settings?pretty=true' -d '{
    "transient" : {
        "cluster.routing.allocation.enable" : "none"
    }
}'

2. 노드 shutdown

kill -9 PID

3. Elasticsearch 플러그인 설치

4. Elasticsearch 서버 구동

5. shard allocation 옵션을 enable 한다.

$ curl -XPUT 'localhost:9200/_cluster/settings?pretty=true' -d '{
    "transient" : {
        "cluster.routing.allocation.enable" : "all"
    }
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment