47.集群节点维护—删除node
2022-07-26 本文已影响0人
大勇任卷舒
删除master-eligible node
- 如果同时关闭一半或更多master-eligible node,那么cluster通常将变得不可用
- 如果发生这种情况,可以通过再次启动已删除的node来使cluster重新联机
- 只要cluster中至少有3个master-eligible node,一般来说最好一次删除一个node,让cluster有足够的时间自动投票和适应故障对新node集的容错度
- 如果只剩下两个符合 master 资格的node,那么这两个node都不能安全地移除
- 可以使用以下命令将node添加到voting configuration排除列表中
# Add node to voting configuration exclusions list and wait for the system
# to auto-reconfigure the node out of the voting configuration up to the
# default timeout of 30 seconds
POST /_cluster/voting_config_exclusions?node_names=node_name
# Add node to voting configuration exclusions list and wait for
# auto-reconfiguration up to one minute
POST /_cluster/voting_config_exclusions?node_names=node_name&timeout=1m
- 当前的排除列表存储在cluster状态中,可以按如下方式检查:
- 此列表的大小受cluster.max_voting_config_exclusions 设置限制,默认为10
GET /_cluster/state?filter_path=metadata.cluster_coordination.voting_config_exclusions
- 如果某个node因为要永久关闭而被排除在voting configuration之外,则可以在它关闭并从cluster中删除后将其排除
# Wait for all the nodes with voting configuration exclusions to be removed from
# the cluster and then remove all the exclusions, allowing any node to return to
# the voting configuration in the future.
DELETE /_cluster/voting_config_exclusions
# Immediately remove all the voting configuration exclusions, allowing any node
# to return to the voting configuration in the future.
DELETE /_cluster/voting_config_exclusions?wait_for_removal=false
大数据视频推荐:
腾讯课堂
CSDN
AIops智能运维机器学习算法实战
ELK入门精讲
AIOps智能运维实战
ELK7 stack开发运维
大数据语音推荐:
ELK7 stack开发运维
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通