当前位置: 首页 > news >正文

139. 由于卸载Rancher主目录,恢复失败

访问Rancher-K8S解决方案博主,企业合作伙伴 :

When attempting to restore an RKE2 cluster, it fails due to Rancher directories being unmounted by the rke2-killall.sh script.
当尝试恢复 RKE2 集群时,由于 rke2-killall.sh 脚本卸载了 Rancher 目录,导致恢复失败。

After initiating the restore process, the job expects the "/var/lib/rancher" to be mounted but the rke2-killall explicitly unmount it due to the command being hardcoded within the script itself per here in Kubernetesv1.27.12
启动恢复过程后,作业预期“/var/lib/rancher”会被挂载,但 rke2-killall 因为命令硬编码在脚本中,明确卸载了它,正如 Kubernetesv1.27.12中所述
It will then try to run "[Applyinator] Command touch [/var/lib/rancher/rke2/server/db/etcd/tombstone", which fails.
然后它会尝试运行“[Applyinator] Command touch [/var/lib/rancher/rke2/server/db/etcd/tombstone”,但失败了。
This leaves the cluster in a broken state and even performing a cluster reset will not help in this case.
这会导致集群处于破损状态,即使进行集群重置也无济于事。

Some error messages (symptoms) can be seen in the logs as the following
日志中可以看到一些错误信息(症状),如下
level=info msg="[Applyinator] Command sh [-c rke2 etcd-snapshot list --etcd-s3 2>/dev/null] finished with err: <nil> and exit code: 127
level=info 消息 g=“[Applyinator] 命令 sh [-c rke2 etcd-snapshot list --etcd-s3 2>/dev/null] 以 err: <nil> 和退出代码 结束

Resolution 结局

It's strongly recommended to upgrade to at least Kubernetesv1.27.16as the issue has been addressed starting from that version.
强烈建议至少升级到Kubernetes v1.27.16,因为这个问题从该版本开始就已经得到解决。

Or, you can apply the following workaround in sequence if you're still on v1.27.12 version:
或者,如果你还在 v1.27.12 版本,也可以依次应用以下变通方法:
When the restore first fails
当恢复第一次失败时
1. Go onto each Control Plane node, and comment out the single line in the script rke2-killall
1. 进入每个控制平面节点,在脚本 rke2-killall 中注释出这行
The script is supposed to be under /usr/local/bin
脚本应该在 /usr/local/bin 下
#do_unmount_and_remove '/var/lib/rancher/rke2'

2. execute "mount -a" on each Control Plane node (as this was removed by the script)
2. 在每个控制平面节点上执行“挂载-a”(因为脚本已移除该操作)

3. execute "systemctl restart rancher-system-agent" on each node.
3. 对每个节点执行“systemctl restart Rancher-System-Agent”。
This causes it to fetch the machine-plan, and use the already present script, to successfully run or proceed with the restore.
这会导致它获取机器计划,并使用已有的脚本,成功运行或继续恢复。

Cause 病因

The rke2-killall.sh script unmounts the Rancher directories.
rke2-killall.sh 脚本会卸载牧场主目录。

Additional Information 附加信息

https://github.com/harvester/harvester/issues/4695

https://github.com/rancher/rancher/issues/40624

Environment 环境

Rancher v2.8.5 and less Rancher v2.8.5 及以下版本
RKE2 v1.27 and less RKE2 v1.27 及以下版本

http://www.jsqmd.com/news/680323/

相关文章:

  • 51单片机新手必看:Proteus里让LM016L液晶屏显示字符的保姆级教程(附完整代码)
  • 2026年质量好的阳台门窗/推拉门窗品牌厂家推荐 - 行业平台推荐
  • 保姆级教程:在Deepin/UOS上手动打包最新版QQ的deb安装包(附字体修复方案)
  • 弱口令漏洞挖掘的30个实战技巧!
  • 140. 如何使用 nginx /dbg
  • 2026年热门的推拉门窗/大连阳光房门窗/卧室门窗厂家综合对比分析 - 品牌宣传支持者
  • 华为eNSP模拟企业网:三层交换机DHCP配置保姆级教程(含VLAN规划与排错)
  • 2026影视拍摄模特选购指南:宣传单派发、小丑魔术师、展会充场、展会兼职、展会模特礼仪、展会派发传单、展会礼仪模特选择指南 - 优质品牌商家
  • 告别付费数据源!用Python+Baostock+MySQL搭建你的免费股票数据本地库(保姆级教程)
  • 智能车竞赛节能信标改造:用ITR9909+BC517达林顿管替换霍尔传感器(附完整电路图)
  • 告别手动抄数据:5分钟学会用WebPlotDigitizer智能提取图表数据
  • 360挖出微软8年致命漏洞,10亿用户安危被改写
  • 为什么头部云厂商已强制要求Docker 27低代码标准?揭秘CNCF最新容器化准入白皮书核心条款
  • XGBClassifier默认参数里藏了哪些坑?新手必看的6个实战避雷指南
  • 141. PLEG is not healthy 问题
  • MCNP新手避坑指南:用Fmesh卡计算钴-60源剂量当量,从几何建模到结果可视化的完整流程
  • 软件测试工程师的35岁破局之道:构建技术与管理双轨制晋升体系
  • 别再死记硬背AHP公式了!用Excel+Python 5分钟搞定数学建模里的权重计算
  • 手机号逆向查询QQ号:3步高效解决方案完整指南
  • 从“完美”执念到“价值”觉醒:一位测试工程师的3000用例优化心路
  • 逆向思维学PWN:通过GDB调试实战,动态理解寄存器与栈的变化
  • Docker 27网络策略升级全貌(隔离能力提升270%?内测数据首次公开)
  • 143. Rancher 支持 Docker 吗?
  • 告别U-Net独大?手把手带你用PyTorch和MONAI复现UNETR,搞定3D医学图像分割
  • GLM-TTS流式推理体验:低延迟实时语音合成,打造交互式应用
  • 避开这些坑!ESP32-CAM驱动舵机时GPIO冲突与电源问题的实战解决
  • 智能门锁加盟哪家好?2026智能门锁加盟/智能指纹锁源头厂家/口碑品牌优选推荐 - 栗子测评
  • 从一颗1N4148说起:在老式收音机里,我是如何发现并修复温度漂移故障的
  • 2026年口碑好的气源处理/气源处理过滤减压阀优质公司推荐 - 行业平台推荐
  • 【仅限内部团队流传】:Docker daemon.json中隐藏的ai-scheduler参数(max-concurrent-builds=0竟导致LLM微调中断)