Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-43832: E2E: Add tests to support NTO over hypershift with multi nodepools. #1184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SargunNarula
Copy link
Contributor

  • Added tests for Multiple Performance Profile under different nodepools
  • Adjusted nodepool utility to handle multiple nodepool
  • Added test suite run in makefile

Copy link
Contributor

openshift-ci bot commented Oct 17, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: SargunNarula
Once this PR has been reviewed and has the lgtm label, please assign dagrayvid for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@SargunNarula SargunNarula changed the title hypershift: Multiple Nodepool test case scenarios OCPBUGS-43832: E2E: Add tests to support NTO over hypershift with multi nodepools. Oct 25, 2024
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Oct 25, 2024
@openshift-ci-robot
Copy link
Contributor

@SargunNarula: This pull request references Jira Issue OCPBUGS-43832, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.0) matches configured target version for branch (4.18.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

  • Added tests for Multiple Performance Profile under different nodepools
  • Adjusted nodepool utility to handle multiple nodepool
  • Added test suite run in makefile

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link
Contributor

@shajmakh shajmakh left a comment

Choose a reason for hiding this comment

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

Thanks for working on this.

@@ -250,7 +250,7 @@ pao-functests-mixedcpus: $(BINDATA)
pao-functests-hypershift: $(BINDATA)
@echo "Cluster Version"
hack/show-cluster-version.sh
hack/run-test.sh -t "./test/e2e/performanceprofile/functests/0_config ./test/e2e/performanceprofile/functests/1_performance ./test/e2e/performanceprofile/functests/3_performance_status ./test/e2e/performanceprofile/functests/6_mustgather_testing" -p "-vv --label-filter="!openshift" -r --fail-fast --flake-attempts=2 --timeout=2h --junit-report=report.xml" -m "Running Functional Tests over Hypershift"
hack/run-test.sh -t "./test/e2e/performanceprofile/functests/0_config ./test/e2e/performanceprofile/functests/1_performance ./test/e2e/performanceprofile/functests/3_performance_status ./test/e2e/performanceprofile/functests/6_mustgather_testing ./test/e2e/performanceprofile/functests/12_hypershift " -p "-vv --label-filter="!openshift" -r --fail-fast --flake-attempts=2 --timeout=2h --junit-report=report.xml" -m "Running Functional Tests over Hypershift"
Copy link
Contributor

Choose a reason for hiding this comment

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

please consider that the d/s CI may also need adjustment to run the new suite periodically

Comment on lines 4 to 23
"context"
"fmt"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
corev1 "k8s.io/api/core/v1"
"k8s.io/utils/pointer"
"sigs.k8s.io/controller-runtime/pkg/client"

performancev2 "github.com/openshift/cluster-node-tuning-operator/pkg/apis/performanceprofile/v2"
manifestsutil "github.com/openshift/cluster-node-tuning-operator/pkg/util"
testutils "github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils"
testclient "github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/client"
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/discovery"
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/hypershift"
testlog "github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/log"
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/nodepools"
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/nodes"
"github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/utils/profiles"
hypershiftv1beta1 "github.com/openshift/hypershift/api/hypershift/v1beta1"
kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"
Copy link
Contributor

Choose a reason for hiding this comment

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

it's better to have the imports groups in the following shape:
(
go libs

framework packages like gomega/ginkgo

k8s 3rd party packages

other 3rd party packages (like hypershift)

local packages
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Revised the import order, Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The package - hypershiftv1beta1 "github.com/openshift/hypershift/api/hypershift/v1beta1" could not follow this order, gofmt moves it to last place.

@Tal-or
Copy link
Contributor

Tal-or commented Oct 29, 2024

Where do we create additional nodePool? I don't see it.

@SargunNarula
Copy link
Contributor Author

Where do we create additional nodePool? I don't see it.

I'm deploying the additional nodepool using kcli, while cluster installation in my test environment. There is an alternative method using hypershift with the command hypershift create nodepool --cluster-name . However, I don't believe it's appropriate to include commands that modify the cluster structure within a test. There is a way to add via applying a manifest - Link

But i think the arch details are beyond the scope of this test, What do you suggest?

@mrniranjan
Copy link
Contributor

Where do we create additional nodePool? I don't see it.

Creation of nodepool and adding hosts under nodepool is an infrastructure thing, Currently this is not possible in upstream CI, We need to skip these tests and execute these tests only in downstream

- Added tests for Multiple Performance Profile under different nodepools
- Adjusted nodepool utility to handle multiple nodepool
- Added test suite run in makefile

Signed-off-by: Sargun Narula <[email protected]>
Comment on lines +53 to +56
Expect(err).ToNot(HaveOccurred())
hostedClusterName, err := hypershift.GetHostedClusterName()
Expect(err).ToNot(HaveOccurred())
nodePools, err = ListNodePools(context.TODO(), testclient.ControlPlaneClient, hostedClusterName)
Copy link
Contributor

Choose a reason for hiding this comment

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

let's also add info log for the hostedClusterName

@SargunNarula
Copy link
Contributor Author

/retest

Copy link
Contributor

openshift-ci bot commented Nov 15, 2024

@SargunNarula: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-hypershift-pao 31c1e5d link true /test e2e-hypershift-pao

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@Tal-or
Copy link
Contributor

Tal-or commented Nov 17, 2024

Where do we create additional nodePool? I don't see it.

Creation of nodepool and adding hosts under nodepool is an infrastructure thing, Currently this is not possible in upstream CI, We need to skip these tests and execute these tests only in downstream

I agree. these kind of tests need to be running on the d/s and skipped u/s

@Tal-or
Copy link
Contributor

Tal-or commented Nov 17, 2024

    [test_id:75077] should verify support for different performance profiles on hosted cluster via multiple node pools
    /go/src/github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/12_hypershift/hypershift.go:87
  > Enter [BeforeAll] Multiple performance profile in hypershift - /go/src/github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/12_hypershift/hypershift.go:43 @ 11/15/24 08:59:13.066
  STEP: Checking if discovery mode is enabled and performance profile is not found - /go/src/github.com/openshift/cluster-node-tuning-operator/test/e2e/performanceprofile/functests/12_hypershift/hypershift.go:44 @ 11/15/24 08:59:13.067
  Nov 15 08:59:13.067: [INFO]: Node label: map[node-role.kubernetes.io/worker:]
  [FAILED] Expected
      <int>: 1
  to be >=
      <int>: 2

Probably this should be skipped u/s because we only have a single nodepool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants