Skip to content

fix(lifecycle): run patch image commands on standalone control-plane hosts - #7417

Merged
cuisongliu merged 1 commit into
labring:mainfrom
zijiren233:fix/standalone-patch-on-masters
Oct 29, 2026
Merged

cuisongliu merged 1 commit into
labring:mainfrom
zijiren233:fix/standalone-patch-on-masters

Conversation

@zijiren233

@zijiren233 zijiren233 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #7344.

Problem

The standalone control-plane guard added in #7344 lives in the shared guest.Apply path, so it skipped control-plane hosts for both rootfs and patch image commands. Patch images are the supported mechanism for layering host-level changes (runtimes, node tooling, image-cri-shim upgrades), and their scripts already decide per host what to install or skip; on a standalone cluster those commands never ran on masters, which only received file distribution while workers executed everything.

Change

Keep the skip for rootfs mounts only. In standalone mode the rootfs image hooks are owned by the dedicated standalone lifecycle (containerd, kubelet, static control-plane pods, route controller); patch and application images keep their normal semantics:

  • rootfs: control-plane hosts skipped (unchanged, dedicated lifecycle owns them)
  • patch: executed on every host; scripts choose per-host behavior
  • application: executed on the first master only (unchanged path)

Note this is a deliberate behavior change: every patch image now executes on standalone masters. For example an image-cri-shim upgrade patch must run there, since image-cri-shim is installed and active on standalone masters.

Validation

Standalone test cluster (3 control-plane hosts without Node objects, 2 workers, Kubernetes 1.33.6, containerd 1.7, Cilium), sealos built from this branch. sealos run of three patch images (gVisor runtime, stargz snapshotter, combined runsc-stargz handler):

  • all five hosts executed the image commands (before the fix: masters received files only, zero command output)
  • masters took the control-plane path of each script: runtime install skipped, RuntimeClass applied only on the host holding ~/.kube/config (runtimeclass.node.k8s.io/gvisor unchanged), other masters logged the no-kubeconfig notice
  • workers were idempotent: already installed; refreshing configuration, configuration unchanged; containerd restart not needed, containerd ActiveEnterTimestamp unchanged
  • regression: both workers Ready, all three RuntimeClasses present (gvisor, stargz, gvisor-stargz), runsc still absent from all control-plane hosts

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.49%. Comparing base (fa0fbc7) to head (49436d9).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7417      +/-   ##
==========================================
- Coverage   61.86%   61.49%   -0.38%     
==========================================
  Files           8        8              
  Lines         653      657       +4     
==========================================
  Hits          404      404              
- Misses        202      206       +4     
  Partials       47       47              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…hosts

Standalone mode skipped control-plane hosts for both rootfs and patch
image commands. Rootfs hooks are owned by the dedicated standalone
lifecycle, but patch images are the supported mechanism for layering
host-level changes (runtimes, node tools) and their scripts already
decide per host what to install or skip. Keep the skip for rootfs
mounts only.
@zijiren233
zijiren233 force-pushed the fix/standalone-patch-on-masters branch from 49436d9 to ed680d1 Compare October 29, 2026 03:23
@cuisongliu cuisongliu added this to the v5.2 milestone Oct 29, 2026
@cuisongliu
cuisongliu merged commit f59d3ab into labring:main Oct 29, 2026
96 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🤖 says: cherry pick action finished successfully 🎉!
See: https://github.com/labring/sealos/actions/runs/40830492373

cuisongliu pushed a commit that referenced this pull request Oct 29, 2026
…hosts (#7419)

fix(lifecycle): run patch image commands on standalone control-plane hosts (#7417)

Standalone mode skipped control-plane hosts for both rootfs and patch
image commands. Rootfs hooks are owned by the dedicated standalone
lifecycle, but patch images are the supported mechanism for layering
host-level changes (runtimes, node tools) and their scripts already
decide per host what to install or skip. Keep the skip for rootfs
mounts only.

Co-authored-by: zijiren <84728412+zijiren233@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants