-
Notifications
You must be signed in to change notification settings - Fork 117
OCPBUGS-62091: E2E: Add function to check control plane nodes are schedulable. #1396
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-62091: E2E: Add function to check control plane nodes are schedulable. #1396
Conversation
Signed-off-by: Niranjan M.R <[email protected]>
Skip Node selector tests when control plane nodes are schedulable since this tests primarily adds and deletes mcp on worker nodes and modifies the performance profile appropriately. This test is not applicable when control plane nodes are schedulable and we are relying on performance profile applied to control plane nodes Signed-off-by: Niranjan M.R <[email protected]>
|
@mrniranjan: This pull request references Jira Issue OCPBUGS-62091, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
|
@openshift-ci-robot: GitHub didn't allow me to request PR reviews from the following users: mrniranjan. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
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. |
| return false, err | ||
| } | ||
|
|
||
| if len(controlPlaneNodes.Items) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is the right way. Why not check the cluster configuration?
oc get scheduler cluster -o yaml
check mastersSchedulable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that could be the more elegant approach I was hinting :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
/retest |
Signed-off-by: Niranjan M.R <[email protected]>
59ba31e to
985a1b6
Compare
MarSik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MarSik, mrniranjan 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 |
| if err := testclient.DataPlaneClient.List(context.TODO(), controlPlaneNodes, &client.ListOptions{LabelSelector: selector}); err != nil { | ||
| // Check if the control plane nodes are schedulable, returns true if schedulable else false | ||
| func IsControlPlaneSchedulable(ctx context.Context) (bool, error) { | ||
| cfg, err := testclient.GetRestConfigFromClient(testclient.Client) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this config needed? can't this be done using simple client Get():
scheduler := &configv1.Scheduler{}
Expect(testclient.DataPlaneClient.Get(ctx, client.ObjectKey{Name: "cluster"}, scheduler)).ToNot(HaveOccurred())
return scheduler.Spec.mastersSchedulable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shajmakh
Because we are adding mastersSchedulable to true in "cluster" resource. and the API to fetch this information is available using "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" which requires rest client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shajmakh
scheduler := &configv1.Scheduler{} ,
this is not possible, We can access scheduler after we create a new variable of configv1 struct
openshiftConfigClient := clientconfigv1.NewForConfigOrDie(<rest config>)
openshiftConfigClient.Schedulers().Get
Signed-off-by: Niranjan M.R <[email protected]>
|
@MarSik did some minor changes, Could you review again |
Signed-off-by: Niranjan M.R <[email protected]>
|
/retest |
ffromani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
/test okd-scos-e2e-aws-ovn |
|
/verified by @mrniranjan |
|
@mrniranjan: This PR has been marked as verified by In response to this:
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. |
b5d66f8
into
openshift:main
|
@mrniranjan: Jira Issue Verification Checks: Jira Issue OCPBUGS-62091 Jira Issue OCPBUGS-62091 has been moved to the MODIFIED state and will move to the VERIFIED state when the change is available in an accepted nightly payload. 🕓 In response to this:
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. |
|
/cherry-pick release-4.20 |
|
@mrniranjan: new pull request created: #1398 In response to this:
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. |
|
Fix included in accepted release 4.21.0-0.nightly-2025-09-27-045323 |
This PR adds util function to check if Control plane nodes are schedulable and
if so skips Node selector tests