CKS upgrade fails in air-gapped clusters when the new K8s version bumps the pause image (kubeadm upgrade health-check Job scheduled on worker without the image)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- bash, java, kubernetes
- 領域
- devops, infrastructure
調査の方向性
Start with KubernetesClusterUpgradeWorker, upgradeKubernetesClusterNodes(), and upgrade-kubernetes.sh; trace how ISO images are imported and how the upgrade script’s output is handled. Reproduce the failure in an offline upgrade where the target pause image is missing on workers. Done means the health-check Job can run using images from the ISO and upgrade failures provide the script output in management-server.log.
索引モデルが issue の本文から書いたものです。
説明
problem
Since kubeadm runs a CreateJob health check during upgrade apply/upgrade plan,
it creates a Job upgrade-health-check-* in kube-system using the pause image of the
TARGET version (registry.k8s.io/pause:3.10.2 for 1.36.5).
CKS upgrades node 0 (control) first. The upgrade script imports ISO images only on the
node it runs on, so at this point the workers still only have pause:3.10.1.
The control node has also just been drained (cordoned), so the Job pod is scheduled on a
worker, tries to pull from registry.k8s.io, fails (air-gapped), the Job hits its deadline,
and kubeadm upgrade apply fails. The fallback retry only ignores
CoreDNSUnsupportedPlugins, so it fails again. The upgrade fails after all retries.
versions
COMPONENT NAME
Kubernetes Service (CKS) – KubernetesClusterUpgradeWorker / upgrade-kubernetes.sh
CLOUDSTACK VERSION
4.23
ENVIRONMENT
- Upgrade: v1.35.9 -> v1.36.5 (offline ISO, no internet on nodes)
- containerd 1.7.12, 1 control + 2 workers, Cilium CNI
OS
- Ubuntu 24.04
The steps to reproduce the bug
STEPS TO REPRODUCE
- Deploy an offline CKS cluster on a version whose pause tag differs from the target
(1.35.x -> pause 3.10.1) - Register the 1.36.5 ISO (contains pause 3.10.2) and upgrade the cluster
kubectl -n kube-system get events | grep upgrade-health-check
EXPECTED RESULTS
Upgrade succeeds using only images from the ISO.
ACTUAL RESULTS
Failed to pull image "registry.k8s.io/pause:3.10.2": ... lookup registry.k8s.io ... i/o timeout
Job was active longer than specified deadline
(control node left cordoned, still v1.35.9; worker has only pause:3.10.1)
kubeadm upgrade plan v1.36.5 reproduces it (hangs on "Job ... is not yet complete").
LOGS
1. Health-check Job events (one full cycle, the same pattern repeated for 8 Jobs between 56m and 46m)
$ kubectl -n kube-system get events --sort-by=.lastTimestamp | grep -iE 'upgrade-health|pause|pull'
56m Normal SuccessfulCreate job/upgrade-health-check-1794277494890 Created pod: upgrade-health-check-1794277494890-vbh5b
56m Normal Scheduled pod/upgrade-health-check-1794277494890-vbh5b Successfully assigned kube-system/upgrade-health-check-1794277494890-vbh5b to k8s-upgrade-node-1a1c33de33f
56m Warning Failed pod/upgrade-health-check-1794277494890-vbh5b Failed to pull image "registry.k8s.io/pause:3.10.2": failed to pull and unpack image "registry.k8s.io/pause:3.10.2": failed to resolve reference "registry.k8s.io/pause:3.10.2": failed to do request: Head "https://registry.k8s.io/v2/pause/manifests/3.10.2": dial tcp: lookup registry.k8s.io on 127.0.0.53:53: read udp 127.0.0.1:45086->127.0.0.53:53: i/o timeout
55m Warning Failed pod/upgrade-health-check-1794277494890-vbh5b Error: ErrImagePull
55m Normal BackOff pod/upgrade-health-check-1794277494890-vbh5b Back-off pulling image "registry.k8s.io/pause:3.10.2"
55m Warning Failed pod/upgrade-health-check-1794277494890-vbh5b Error: ImagePullBackOff
55m Normal SuccessfulDelete job/upgrade-health-check-1794277494890 Deleted pod: upgrade-health-check-1794277494890-vbh5b
55m Warning DeadlineExceeded job/upgrade-health-check-1794277494890 Job was active longer than specified deadline
Jobs created: 1794277494890, 1794277555081, 1794277651281, 1794277711462,
1794277807947, 1794277868124, 1794277969440, 1794278029604. All were scheduled on the worker
k8s-upgrade-node-1a1c33de33f and all failed the same way. 8 Jobs = 4 script runs
(upgrade retries) x 2 kubeadm upgrade apply attempts per run.
2. Reproduce with kubeadm upgrade plan (control node)
$ kubeadm upgrade plan v1.36.5 --v=5
[upgrade] Running cluster health checks
I1110 03:21:49.429624 health.go:182] Creating a Job "upgrade-health-check-1794280909429" in the namespace "kube-system"
I1110 03:21:49.449846 health.go:210] Job "upgrade-health-check-1794280909429" in the namespace "kube-system" is not yet complete, retrying
... (repeats every 1s until deadline)
3. Image state: control has the image, worker does not
# control node (images imported from 1.36.5 ISO)
$ kubeadm config images list --kubernetes-version v1.36.5 | grep pause
registry.k8s.io/pause:3.10.2
$ crictl images | grep pause
registry.k8s.io/pause 3.10.1 cd073f4c5f6a8 320kB
registry.k8s.io/pause 3.10.2 4a83b15d3ecfe 321kB
# worker node (not yet upgraded)
$ crictl images | grep pause
registry.k8s.io/pause 3.10.1 cd073f4c5f6a8 320kB
4. Cluster state after failure
$ kubectl get node
NAME STATUS ROLES AGE VERSION
k8s-upgrade-control-1a1c33cc713 Ready,SchedulingDisabled control-plane 57m v1.35.9
k8s-upgrade-node-1a1c33d569a Ready <none> 56m v1.35.9
k8s-upgrade-node-1a1c33de33f Ready <none> 56m v1.35.9
kubeadm binary on control is already v1.36.5, but static pods and kubelet are still v1.35.9
(the script exits at kubeadm upgrade apply).
Environment: containerd 1.7.12, imageRepository: registry.k8s.io,
sandbox_image = "registry.k8s.io/pause:3.10.2" (control).
WORKAROUND
Export pause:3.10.2 from the control node, import it on all workers, then retry the upgrade.
What to do about it?
SUGGESTED FIX
- Pre-stage phase: after
attachIsoKubernetesVMs, import ISO images on ALL cluster VMs
before upgrading node 0 (e.g. split image import out of upgrade-kubernetes.sh into a
separate script/flag run on every node first). - Log
result.second()(script stdout/stderr) on failure in
upgradeKubernetesClusterNodes(). It is currently discarded, which makes the
failure invisible in management-server.log. - Minor:
upgrade-kubernetes.shchecks$# -lt 4but its usage text and the Java caller use 5 args;
PAUSE_IMAGEselection viactr images ls | grep pause | sort | tail -1is fragile.
Usekubeadm config images list | grep pauseinstead.
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 7日 16時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/cloudstack のほかの issue
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new size対応中かも @bhouse-nexthop が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14645 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replaced対応中かも @bhouse-nexthop が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/cloudstack#14633 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)対応中かも @bhouse-nexthop が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/cloudstack#14631 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/cloudstack#14625 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)対応中かも @willbennett-devops が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/cloudstack#14545 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
apache/cloudstack の issue をすべて見る
似ている issue
-
[Bug]: Nullable implicit operator on string extensible enums still throws for a null string対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug emitter:client:csharp
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/typespec#12572 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: Java SDK MountRequest always sends update-optional fields, resetting stored mount settingsオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configuration対応中かも @amalsaidov が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信