Skip to content

Conversation

harikrishna-patnala
Copy link
Contributor

@harikrishna-patnala harikrishna-patnala commented Jul 14, 2025

Description of changes:
Added e2e test for multiple network support for the K8s nodes

Testing performed:
Ran the specific test and it has passed

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

netlify bot commented Jul 14, 2025

Deploy Preview for kubernetes-sigs-cluster-api-cloudstack ready!

Name Link
🔨 Latest commit 14cb7cb
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-cluster-api-cloudstack/deploys/6875e1be862a51000820738b
😎 Deploy Preview https://deploy-preview-455--kubernetes-sigs-cluster-api-cloudstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 14, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @harikrishna-patnala. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 14, 2025
@blueorangutan
Copy link

Test Results : (tid-887)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.32.3
Kubernetes Version upgrade from: v1.31.7
Kubernetes Version upgrade to: v1.32.3
CloudStack Version: 4.20
Template: ubuntu-2404-kube
Jobs filtered by: Test with multiple networks for nodes
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr455-sl-887.zip



Summarizing 2 Failures:
 [FAIL] [SynchronizedBeforeSuite] 
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/clusterctl/e2e_config.go:69
 [FAIL] [SynchronizedAfterSuite] 
 /jenkins/workspace/capc-e2e-new/test/e2e/e2e_suite_test.go:185

Ran 0 of 35 Specs in 0.079 seconds
FAIL! -- A BeforeSuite node failed so all tests were skipped.
--- FAIL: TestE2E (0.08s)
FAIL

@blueorangutan
Copy link

Test Results : (tid-888)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.32.3
Kubernetes Version upgrade from: v1.31.7
Kubernetes Version upgrade to: v1.32.3
CloudStack Version: 4.20
Template: ubuntu-2404-kube
Jobs filtered by: Test with multiple networks for nodes
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr455-sl-888.zip



Summarizing 1 Failure:
 [FAIL] Test with multiple networks for nodes [It] Should create a workload cluster
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/controlplane_helpers.go:153

Ran 1 of 35 Specs in 1301.245 seconds
FAIL! -- 0 Passed | 1 Failed | 0 Pending | 34 Skipped
--- FAIL: TestE2E (1301.25s)
FAIL

@blueorangutan
Copy link

Test Results : (tid-889)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.32.3
Kubernetes Version upgrade from: v1.31.7
Kubernetes Version upgrade to: v1.32.3
CloudStack Version: 4.20
Template: ubuntu-2404-kube
Jobs filtered by: Test with multiple networks for nodes
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr455-sl-889.zip



Summarizing 1 Failure:
 [FAIL] Test with multiple networks for nodes [It] Should create a workload cluster
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/controlplane_helpers.go:153

Ran 1 of 35 Specs in 1341.961 seconds
FAIL! -- 0 Passed | 1 Failed | 0 Pending | 34 Skipped
--- FAIL: TestE2E (1341.96s)
FAIL

@blueorangutan
Copy link

Test Results : (tid-891)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.32.3
Kubernetes Version upgrade from: v1.31.7
Kubernetes Version upgrade to: v1.32.3
CloudStack Version: 4.20
Template: ubuntu-2404-kube
Jobs filtered by: When testing with disk offering
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr455-sl-891.zip



Ran 1 of 35 Specs in 318.009 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 34 Skipped
PASS

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 25.21%. Comparing base (d597e80) to head (14cb7cb).
Report is 123 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #455      +/-   ##
==========================================
- Coverage   25.66%   25.21%   -0.46%     
==========================================
  Files          59       72      +13     
  Lines        5563     6941    +1378     
==========================================
+ Hits         1428     1750     +322     
- Misses       3996     5022    +1026     
- Partials      139      169      +30     

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

@blueorangutan
Copy link

Test Results : (tid-890)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.32.3
Kubernetes Version upgrade from: v1.31.7
Kubernetes Version upgrade to: v1.32.3
CloudStack Version: 4.20
Template: ubuntu-2404-kube
Jobs filtered by: When testing creation of CKS cluster in ACS | Test with multiple networks for nodes
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr455-sl-890.zip



Summarizing 2 Failures:
 [FAIL] When testing creation of CKS cluster in ACS [It] Should create a workload cluster
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/controlplane_helpers.go:153
 [FAIL] Test with multiple networks for nodes [It] Should create a workload cluster
 /jenkins/workspace/capc-e2e-new/test/e2e/multiple_networks.go:127

Ran 2 of 35 Specs in 2566.104 seconds
FAIL! -- 0 Passed | 2 Failed | 0 Pending | 33 Skipped
--- FAIL: TestE2E (2566.11s)
FAIL

@blueorangutan
Copy link

Test Results : (tid-892)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.32.3
Kubernetes Version upgrade from: v1.31.7
Kubernetes Version upgrade to: v1.32.3
CloudStack Version: 4.20
Template: ubuntu-2404-kube
Jobs filtered by: Test with multiple networks for nodes
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr455-sl-892.zip



Summarizing 1 Failure:
 [FAIL] Test with multiple networks for nodes [It] Should create a workload cluster
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/controlplane_helpers.go:153

Ran 1 of 35 Specs in 1292.259 seconds
FAIL! -- 0 Passed | 1 Failed | 0 Pending | 34 Skipped
--- FAIL: TestE2E (1292.26s)
FAIL

@blueorangutan
Copy link

Tests were aborted.

1 similar comment
@blueorangutan
Copy link

Tests were aborted.

@blueorangutan
Copy link

Test Results : (tid-895)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.32.3
Kubernetes Version upgrade from: v1.31.7
Kubernetes Version upgrade to: v1.32.3
CloudStack Version: 4.20
Template: ubuntu-2404-kube
Jobs filtered by: Test with multiple networks for nodes
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr455-sl-895.zip



Summarizing 1 Failure:
 [FAIL] Test with multiple networks for nodes [It] Should create a workload cluster
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/controlplane_helpers.go:153

Ran 1 of 35 Specs in 1304.332 seconds
FAIL! -- 0 Passed | 1 Failed | 0 Pending | 34 Skipped
--- FAIL: TestE2E (1304.33s)
FAIL

@blueorangutan
Copy link

Test Results : (tid-896)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.32.3
Kubernetes Version upgrade from: v1.31.7
Kubernetes Version upgrade to: v1.32.3
CloudStack Version: 4.20
Template: ubuntu-2404-kube
Jobs filtered by: Test with multiple networks for nodes
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr455-sl-896.zip



Ran 1 of 35 Specs in 420.221 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 34 Skipped
PASS

@vishesh92 vishesh92 requested review from vishesh92 and Copilot and removed request for dims July 14, 2025 14:17
Copy link

@Copilot 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 adds an end-to-end test to verify multiple network support on CloudStack nodes.

  • Introduces a new e2e spec and helper functions to create and validate a secondary network
  • Adds CloudStackMachineTemplate patches and a kustomization for dual-network setups
  • Updates the e2e test configuration to include the multiple-networks template

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/e2e/multiple_networks_test.go New entry point for the multiple networks spec
test/e2e/multiple_networks.go Implements MultipleNetworksSpec, cluster creation, and NIC validation
test/e2e/data/infrastructure-cloudstack/v1beta3/cluster-template-multiple-networks/multiple-networks.yaml Defines dual-network machine templates
test/e2e/data/infrastructure-cloudstack/v1beta3/cluster-template-multiple-networks/kustomization.yaml Registers the multiple-networks patch
test/e2e/config/cloudstack.yaml Adds the new multiple-networks template to the provider config
test/e2e/common.go Adds EnsureSecondaryNetworkExists and CheckIfNodesHaveTwoNICs helper functions
Comments suppressed due to low confidence (2)

test/e2e/common.go:578

  • Missing import for the CloudStack client package, causing unresolved reference to cloudstack. Add the appropriate import (e.g., github.com/apache/cloudstack-go/v2/cloudstack).
func EnsureSecondaryNetworkExists(client *cloudstack.CloudStackClient, input CommonSpecInput) (*cloudstack.Network, error) {

test/e2e/config/cloudstack.yaml:105

  • The referenced file does not exist. Update sourcePath to point to the kustomization directory (../data/infrastructure-cloudstack/v1beta3/cluster-template-multiple-networks/) or to the correct YAML file path.
      - sourcePath: "../data/infrastructure-cloudstack/v1beta3/cluster-template-multiple-networks.yaml"

@vishesh92
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 15, 2025
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.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 15, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harikrishna-patnala, vishesh92

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 15, 2025
@k8s-ci-robot k8s-ci-robot merged commit 7521b14 into kubernetes-sigs:main Jul 15, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants