Skip to content

Conversation

theboringstuff
Copy link
Collaborator

@theboringstuff theboringstuff commented Jun 3, 2025

Description

Containerd was upgraded in #735, but the related patch does not work, since it does not handle specific problems with iptables which occur during containerd 1.6 -> 1.7 upgrade (from ubuntu repositories)

Solution

  • Patch from v0.37.0 was marked to have known issue and recommended to skip
  • Added new patch for next KM release, which helps to upgrade containerd correctly
    • This patch works only if it detects that some nodes have containerd package different from inventory version
    • On problematic nodes, containerd upgrade is performed with caution:
      • Node is drained first (best-effort)
      • Kubelet is stopped
      • Containerd pod sandboxes removed
      • Required containerd version is installed
      • Kubelet started, node uncordoned (with retries)
      • For control-plane nodes, we also wait control-plane pods to become healthy, before moving to next node

Test Cases

TestCase 1

Steps:

  1. Install cluster with containerd.io=1.6*. Note that this should be explicitly specified in cluster.yaml, since regular containerd=1.6* package (without .io) is no longer available.
  2. Specify version containerd.io=1.7* in cluster.yaml, without running install tasks (just inventory update). This step simulates inconsistency between nodes and "cluster.yaml"
  3. Run migrate_kubemarine

Results:

Before After
on v0.37.0, upgrade_cri step just installs new version on all nodes, without handling specific problems for 1.6 -> 1.7 upgrade on new version, containerd_upgrade step performs installation with special considerations for iptables issue: per-node, with drain, kubelet start/stop, contaieners removal, waiting for pods

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • There is no breaking changes, or migration patch is provided
  • Integration CI passed
  • Unit tests. If Yes list of new/changed tests with brief description
  • There is no merge conflicts

@theboringstuff theboringstuff marked this pull request as ready for review June 3, 2025 10:40
@theboringstuff theboringstuff marked this pull request as draft July 8, 2025 08:32
@theboringstuff theboringstuff marked this pull request as ready for review July 8, 2025 08:41
@theboringstuff theboringstuff merged commit c445908 into main Jul 9, 2025
36 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants