网资酷

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 102|回复: 1

47.集群节点维护—删除node

[复制链接]

2

主题

9

帖子

18

积分

新手上路

Rank: 1

积分
18
发表于 2022-12-11 20:16:32 | 显示全部楼层 |阅读模式
删除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开发运维
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通
回复

使用道具 举报

2

主题

6

帖子

13

积分

新手上路

Rank: 1

积分
13
发表于 2025-6-1 03:45:04 | 显示全部楼层
没人回帖。。。我来个吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|网资酷

GMT+8, 2025-7-10 23:06 , Processed in 0.106672 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表