CKS: upgradeKubernetesCluster fails on control node when binaries ISO ships headlamp.yaml instead of dashboard.yaml
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 68/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- kubernetes, shell
- 領域
- devops, infrastructure
研究方向
從 script/upgrade-kubernetes.sh 開始,並將其對 dashboard 的處理與 k8s-control-node.yml 進行比較;該 issue 也指出 create-kubernetes-binaries-iso.sh 是 ISO 內容的來源。使用包含 headlamp.yaml 的 ISO 重現升級,然後驗證在缺少 dashboard.yaml 時升級仍能完成,並且 fallback 行為已涵蓋。
由索引模型根據 Issue 內容生成。
描述
problem
Since 4.23, create-kubernetes-binaries-iso.sh packages the Headlamp dashboard as headlamp.yaml
instead of dashboard.yaml. The cluster create path (k8s-control-node.yml) handles both files,
but upgrade-kubernetes.sh still hardcodes:
/opt/bin/kubectl apply -f ${BINARIES_DIR}/dashboard.yaml
The script runs with bash -e, so on the first control node it exits non-zero after kubeadm
upgrade apply and the kubelet swap have already succeeded. The worker retries
(cloud.kubernetes.cluster.upgrade.retries) and then fails the job, leaving the control node
on the new version but cordoned, the workers on the old version, the cluster in Alert,
and the DB still recording the old version.
Management server log:
SSH execution of command sudo ./upgrade-kubernetes.sh.sh 1.36.0 true false false true
has an error status code in return. Result output: Installing binaries from /mnt/k8sdisk/
Failed to upgrade Kubernetes cluster : single, unable to upgrade Kubernetes node on VM : single-control-...
Running the script by hand on the control node shows:
error: the path "/mnt/k8sdisk//dashboard.yaml" does not exist
ISO contents:
10-kubeadm.conf autoscaler.yaml cni cri-tools docker headlamp.yaml k8s kubelet.service
manifest.yaml network.yaml provider.yaml snapshot-crds.yaml
versions
ACS 4.23.0.0 (also present on main at 0a5bf30)
Kubernetes upgrade 1.35.8 -> 1.36.0, ISO built with the 4.23 create-kubernetes-binaries-iso.sh
Hypervisor: kvm Network: isolated..
The steps to reproduce the bug
- Build and register a Kubernetes version ISO with the 4.23 create-kubernetes-binaries-iso.sh (contains headlamp.yaml)
- Deploy a CKS cluster on the previous minor version
- Call upgradeKubernetesCluster to the new version
- Job fails on the first control node; kubectl get nodes shows control on new version, SchedulingDisabled
What to do about it?
Make upgrade-kubernetes.sh use the same fallback as k8s-control-node.yml: apply headlamp.yaml
if present, else dashboard.yaml, else warn. I'll open a PR. Workaround: patch
script/upgrade-kubernetes.sh inside the management server jar and restart.
I already have tested a fix and will put in a PR.
- 主要語言
- Java
- 星號
- 3.1k
- 分支
- 1.4k
- 平均合併
- 5 天 15 小時
- 30 天內合併 PR
- 24
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/cloudstack 的其他 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 80/100
apache/cloudstack#14248 ·
維護者通常 1 天內回覆
-
bug
難度 1/5 1 小時以內 新手友好度 90/100
apache/cloudstack#14222 ·
維護者通常 1 天內回覆
-
bug component:kubernetes
難度 1/5 1 小時以內 新手友好度 88/100
apache/cloudstack#14180 ·
維護者通常 1 天內回覆
-
bug component:projects component:UI
難度 1/5 1 小時以內 新手友好度 88/100
apache/cloudstack#14070 · 5 則留言 ·
維護者通常 1 天內回覆
-
component:backup
難度 2/5 1-3 小時 新手友好度 76/100
apache/cloudstack#14013 ·
維護者通常 1 天內回覆
查看 apache/cloudstack 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
termux/termux-app#5340 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 86/100
apache/rocketmq-dashboard#5110 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 4 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆
-
bug javascript
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 1 天內回覆