Skip to content

Conversation

@Pearl1594
Copy link
Contributor

Description

This PR adds a fix where in it checks the validity of the network offering of the network provided while creating the CKS cluster rather than that of the network offering set in the global setting

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

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

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

@codecov
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.17%. Comparing base (0f0155c) to head (8406ce0).
⚠️ Report is 25 commits behind head on 4.20.

Files with missing lines Patch % Lines
...bernetes/cluster/KubernetesClusterManagerImpl.java 0.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #11528   +/-   ##
=========================================
  Coverage     16.17%   16.17%           
- Complexity    13283    13284    +1     
=========================================
  Files          5656     5656           
  Lines        497996   498007   +11     
  Branches      60401    60405    +4     
=========================================
+ Hits          80533    80535    +2     
- Misses       408500   408511   +11     
+ Partials       8963     8961    -2     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.02% <0.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 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.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube Cloud

@blueorangutan
Copy link

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

@borisstoyanov
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@borisstoyanov 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

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

@Pearl1594
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
ContextSuite context=TestRAMCPUResourceAccounting>:setup Error 0.00 test_resource_accounting.py

@Pearl1594 Pearl1594 marked this pull request as ready for review September 3, 2025 19:43
@weizhouapache weizhouapache added this to the 4.20.2 milestone Sep 3, 2025
@weizhouapache weizhouapache self-assigned this Sep 8, 2025
@vishesh92 vishesh92 requested a review from Copilot September 8, 2025 11:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the Kubernetes cluster creation process where network offering validation was incorrectly using the global setting instead of validating the network offering from the provided network. The fix ensures that when a specific network is provided for cluster creation, its network offering is validated rather than relying solely on the global configuration.

  • Updates network offering validation logic to check the provided network's offering when available
  • Adds proper null checks and error handling for network lookup
  • Maintains backward compatibility with global network offering configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Member

@vishesh92 vishesh92 left a comment

Choose a reason for hiding this comment

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

clgtm

@weizhouapache
Copy link
Member

Tested OK

  • Register CKS ISO
  • Set global config endpoint.url
  • Update cloud.kubernetes.cluster.network.offering setting from DefaultNetworkOfferingforKubernetesService to DefaultNetworkOfferingforKubernetesService2
  • Create a CKS cluster without network, fail with error: Kubernetes service has not been configured properly to provision Kubernetes clusters. this is expected
  • Create network with offering DefaultNetworkOfferingforKubernetesService
  • Create a CKS cluster with the network
    • Without this PR: fail with error: Kubernetes service has not been configured properly to provision Kubernetes clusters. this is expected
    • With this PR: CKS cluster is created successfully

@weizhouapache weizhouapache merged commit 4f5f7d4 into 4.20 Sep 9, 2025
48 of 50 checks passed
@DaanHoogland DaanHoogland deleted the fix-netOff-check-cks branch September 15, 2025 07:21
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Sep 15, 2025
…lobal setting (apache#11528)

* CKS: Validate network offering from network if provided rather than global setting

* update warning message
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.

5 participants