Editing
Cluster Operations
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Follow Through === When doing any activity that disrupts the cluster operations enough to cause it to drop into a "YELLOW" or "RED" state, wait until the cluster is "GREEN" again before proceeding. In the case of a full rolling restart (one node at a time), the cluster should be "GREEN" before proceeding to the next node. This process (node rolling restart, anyway) is captured in the script <code>node-restart.sh</code>: #!/bin/bash # # perform a soft restart of a node, minimizing the reindexing that would # normally occur when a node drops/inserts # set to one of the master nodes MASTER=master-node # replace with either the real admin password or a cert/key combination AUTH="-u admin:admin" # first shut off shard allocation curl -XPUT -H "Content-Type: application/json" <nowiki>https://$MASTER:9200/_cluster/settings</nowiki> $AUTH -d ' { "persistent": { "cluster.routing.allocation.enable": "primaries" } }' echo # now flush the cache curl -XPOST <nowiki>https://$MASTER:9200/_flush</nowiki> $AUTH echo # restart the opensearch process sudo systemctl restart opensearch # re-enable shard allocation curl -XPUT -H "Content-Type: application/json" <nowiki>https://$MASTER:9200/_cluster/settings</nowiki> $AUTH -d ' { "persistent": { "cluster.routing.allocation.enable": null } }' echo This script is intended to be run on the node being restarted.
Summary:
Please note that all contributions to WilliamsNet Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WilliamsNet Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Commons
Architecture
How-To
Systems
Hardware
SysAdmin
Kubernetes
OpenSearch
Special
Pages to create
All pages
Recent changes
Random page
Help about MediaWiki
Formatting Help
Tools
What links here
Related changes
Special pages
Page information