Skip to content

Fix default node offerings saved for Kubernetes clusters - #14613

Open
zheng1771 wants to merge 1 commit into
apache:4.22from
zheng1771:fix/14504-cks-default-node-offerings
Open

zheng1771 wants to merge 1 commit into
apache:4.22from
zheng1771:fix/14504-cks-default-node-offerings

Conversation

@zheng1771

Copy link
Copy Markdown

Description

Fixes: #14504

When a Kubernetes cluster uses the default compute offering, its control
and worker node offering IDs are left empty. Only explicit per-node
offerings are saved.

Save the effective offering ID for control and worker nodes when creating
the cluster. Also save it for separate etcd nodes when present. Use the
default offering if no per-node offering is supplied, and keep explicit
overrides. Existing cluster records are not changed.

To reproduce:

  1. Create a Kubernetes cluster with a default compute offering.
  2. Leave the per-node offerings unset in advanced settings.
  3. Check the control and worker offering IDs in the cluster record.

The IDs should contain the selected default offering instead of null.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Missing node offering IDs can affect later cluster scaling.

Screenshots (if appropriate):

Not applicable. Backend change.

How Has This Been Tested?

Tested with OpenJDK 17 and Maven 3.8.7.

All 37 tests in KubernetesClusterManagerImplTest and
KubernetesClusterScaleWorkerTest passed, including four new regression
tests. Required modules compiled and Checkstyle passed.

Full project build and live-cloud testing were not run.

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

Added tests for:

  • A default offering without per-node overrides.
  • A worker override with default control and etcd offerings.
  • Explicit offerings for all node types without a default offering.
  • An etcd offering supplied when there are no separate etcd nodes.

The default-only and partial-override tests failed with the original
storage behavior and passed after the change. Explicit offerings are
preserved, and no etcd offering is saved when separate etcd nodes are absent.

@DaanHoogland DaanHoogland added this to the 4.22.3 milestone Nov 10, 2026
@codecov

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 18.32%. Comparing base (d02adcd) to head (3532816).
⚠️ Report is 1 commits behind head on 4.22.

Files with missing lines Patch % Lines
...bernetes/cluster/KubernetesClusterManagerImpl.java 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #14613   +/-   ##
=========================================
  Coverage     18.32%   18.32%           
- Complexity    16644    16651    +7     
=========================================
  Files          5939     5939           
  Lines        537768   537770    +2     
  Branches      65929    65927    -2     
=========================================
+ Hits          98551    98569   +18     
+ Misses       428008   427999    -9     
+ Partials      11209    11202    -7     
Flag Coverage Δ
uitests 4.08% <ø> (ø)
unittests 19.42% <87.50%> (+<0.01%) ⬆️

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.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-17583)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 53942 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14613-t17583-kvm-ol8.zip
Smoke tests completed. 149 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

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 - Control and worker node service offerings are not populated when

3 participants