mgmt/nomad_expired_nodes_removal...

45 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Nomad过期客户端节点处理报告
## 概述
根据您的要求已处理Nomad集群中三个过期的客户端节点。这些节点处于"down"状态,我们已经采取了多项措施来加速它们的移除。
## 已处理的节点
1. **bj-semaphore** (ID: fa91f05f)
2. **kr-ch2** (ID: 369f60be)
3. **kr-ch3** (ID: 3bd9e893)
## 已执行操作
1. 已将所有三个节点标记为不可调度(eligibility=ineligible)
- 这确保了Nomad不会再在这些节点上安排新的任务
- 命令: `nomad node eligibility -address=http://100.86.141.112:4646 -disable <node-id>`
2. 对所有三个节点执行了强制排水操作
- 命令: `nomad node drain -address=http://100.86.141.112:4646 -enable -force <node-id>`
- 结果: 所有节点的排水操作都已完成
3. 尝试通过API直接删除节点
- 使用curl命令发送DELETE请求到Nomad API
- 命令: `curl -X DELETE http://100.86.141.112:4646/v1/node/<node-id>`
## 当前状态
节点仍然显示在列表中,但状态已更新:
```
ID Node Pool DC Name Class Drain Eligibility Status
369f60be default dc1 kr-ch2 <none> false ineligible down
3bd9e893 default dc1 kr-ch3 <none> false ineligible down
fa91f05f default dc1 bj-semaphore <none> false ineligible down
```
## 进一步建议
如果需要立即完全移除这些节点,可以考虑以下方法:
1. **重启Nomad服务器**: 重启Nomad服务器将强制重新评估所有节点状态通常会清除已失效的节点
- 注意:这可能会导致短暂的服务中断
2. **手动清理Consul中的节点信息**: 如果Nomad使用Consul作为后端存储可以直接从Consul中删除相关的节点信息
- 需要谨慎操作,避免影响其他正常节点
3. **等待自动清理**: Nomad默认会在72小时后自动清理down状态的节点
## 结论
我们已经采取了所有可能的措施来加速移除这些过期节点。目前它们已被标记为不可调度且已完成排水不会对集群造成影响。如果需要立即完全移除建议重启Nomad服务器。