Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

CKS: upgradeKubernetesCluster fails on control node when binaries ISO ships headlamp.yaml instead of dashboard.yaml

未關閉 適合新手
#14,244 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
68/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
kubernetes, shell

研究方向

從 script/upgrade-kubernetes.sh 開始,並將其對 dashboard 的處理與 k8s-control-node.yml 進行比較;該 issue 也指出 create-kubernetes-binaries-iso.sh 是 ISO 內容的來源。使用包含 headlamp.yaml 的 ISO 重現升級,然後驗證在缺少 dashboard.yaml 時升級仍能完成,並且 fallback 行為已涵蓋。

由索引模型根據 Issue 內容生成。

描述

bug
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
  1. Build and register a Kubernetes version ISO with the 4.23 create-kubernetes-binaries-iso.sh (contains headlamp.yaml)
  2. Deploy a CKS cluster on the previous minor version
  3. Call upgradeKubernetesCluster to the new version
  4. 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

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/cloudstack 的其他 Issue

查看 apache/cloudstack 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。