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)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- bash, java, kubernetes
- Domaine
- devops, infrastructure
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.4k
- Merge moyen
- 7 j 16 h
- PR mergées (30 j)
- 15
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/cloudstack
-
resizeVolume of a running system VM's volume is accepted but the VM never sees the new sizePeut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/cloudstack#14645 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
VR reports a load balancer change as applied when haproxy.cfg cannot be replacedPeut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/cloudstack#14633 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
restartNetwork reports a ResourceUnavailableException as an unexpected error (530), unlike restartVPC (534)Peut-être pris @bhouse-nexthop l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/cloudstack#14631 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
apache/cloudstack#14625 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Remote access VPN users are disconnected on every LB, ACL, port forward or firewall change (xl2tpd restarted on every iptables pass)Peut-être pris @willbennett-devops l’a pris il y a 12 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/cloudstack#14545 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de apache/cloudstack
Issues similaires
-
[Bug]: Nullable implicit operator on string extensible enums still throws for a null stringPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertebug emitter:client:csharp
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
microsoft/typespec#12572 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
[BUG]: Java SDK MountRequest always sends update-optional fields, resetting stored mount settingsOuvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
Les mainteneurs répondent en général sous 1 jour
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationPeut-être pris @amalsaidov l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
needs-area-label
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours