Skip to content

CKS: support headlamp.yaml in upgrade-kubernetes.sh - #14245

Open
mw-0 wants to merge 2 commits into
apache:mainfrom
mw-0:patch-1
Open

mw-0 wants to merge 2 commits into
apache:mainfrom
mw-0:patch-1

Conversation

@mw-0

@mw-0 mw-0 commented Sep 24, 2026

Copy link
Copy Markdown

Description

This PR fixes #14244.

Since 4.23 the binaries ISO ships the Headlamp dashboard as headlamp.yaml instead of
dashboard.yaml. The create path (k8s-control-node.yml) already falls back between the two,
but upgrade-kubernetes.sh hardcoded dashboard.yaml. Because the script runs with bash -e,
every upgrade using a Headlamp ISO failed on the first control node after kubeadm had already
upgraded it, leaving the cluster half-upgraded and in Alert.

This applies the same fallback as the create path: headlamp.yaml, then dashboard.yaml,
then a warning, so ISOs built before and after the Headlamp change both work.

Affects 4.23.0.0 and main. 4.22 is not affected. Happy to retarget if a 4.23 branch is
wanted for a patch release.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • Major

How Has This Been Tested?

  • 4.23.0.0 management server with the patched script, single-control/single-worker CKS
    cluster, isolated network, .
  • Upgraded 1.35.8 -> 1.36.0 using a Headlamp-built ISO: upgrade completes, both nodes on
    v1.36.0, headlamp running in kube-system, cluster back to Running, version updated in DB.
  • Before the patch the same upgrade failed with
    error: the path "/mnt/k8sdisk//dashboard.yaml" does not exist.

How did you try to break this feature and the system with this change?

  • tried to upgrade using custom isos
  • Missing both files only logs a warning instead of failing the upgrade.### Description

@boring-cyborg

boring-cyborg Bot commented Sep 24, 2026

Copy link
Copy Markdown

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
Here are some useful points:

@andrijapanicsb

Copy link
Copy Markdown
Contributor

@ACSHomeBot package G

@ACSHomeBot

ACSHomeBot commented Sep 24, 2026 •

Copy link
Copy Markdown

Packaging results:

Result Artifact Platform
PASS RPM EL (EL8/9/10)
PASS DEB Ubuntu, Debian

Test packages are available at:

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@nvazquez nvazquez added this to the 24.0 milestone Oct 8, 2026
@mw-0

mw-0 commented Oct 16, 2026

Copy link
Copy Markdown
Author

extras removed from file

@Damans227

Copy link
Copy Markdown
Collaborator

can we drop the + at the start of these lines?

@mw-0 that covers it, the script parses fine now

@Damans227 Damans227 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @mw-0, fix looks right. LGTM

@nvazquez

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.39%. Comparing base (0a5bf30) to head (bcaf69a).
⚠️ Report is 81 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14245      +/-   ##
============================================
+ Coverage     20.05%   20.39%   +0.34%     
- Complexity    20656    21283     +627     
============================================
  Files          6427     6481      +54     
  Lines        584905   588040    +3135     
  Branches      71658    72021     +363     
============================================
+ Hits         117278   119951    +2673     
- Misses       454802   455058     +256     
- Partials      12825    13031     +206     
Flag Coverage Δ
uitests 3.70% <ø> (-0.02%) ⬇️
unittests 21.70% <ø> (+0.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19845

This branch has not been deployed

No deployments
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.

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

7 participants