Last active
November 27, 2023 13:35
-
-
Save miladjahandideh/7a4dc5a96d8576d162204eaea786a76d to your computer and use it in GitHub Desktop.
OpenSearch HOST MAINTENANCE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET _cluster/health | |
GET _cat/nodes | |
GET _cluster/settings | |
PUT _cluster/settings | |
{ | |
"persistent": { | |
"cluster.routing.allocation.enable": "none" | |
} | |
} | |
# Now, when you take down a node, OpenSearch won't try to allocate shard from that node to other nodes and you can perform you maintenance activity and then once the node is up, you can enable shard allocation again | |
PUT _cluster/settings | |
{ | |
"persistent": { | |
"cluster.routing.allocation.enable": "all" | |
} | |
} | |
GET _cluster/health | |
GET _cat/nodes | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment