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

sched: controller: set scheduler priority #979

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

shajmakh
Copy link
Member

So far the scheduler priority is set to default which is 0 this is risky especially when the preemtion of pods is needed to fit more important pods.

The NRS is important enough to deserve the most critical priority class system-node-critical which is the same priority for the kube-scheduler.

addresses #974

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2024
@shajmakh
Copy link
Member Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2024
@@ -55,7 +55,8 @@ import (
)

const (
leaderElectionResourceName = "numa-scheduler-leader"
leaderElectionResourceName = "numa-scheduler-leader"
SystemNodeCriticalPriorityClass = "system-node-critical"
Copy link
Member

Choose a reason for hiding this comment

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

please make it private and rename to convey the intent, not the value. Maybe schedulerPriorityClassName

Copy link
Member

Choose a reason for hiding this comment

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

In addition, please record in the commit message why system-node-critical and not system-cluster-critical (I'm fine with the decision, but let's record the reason)

Copy link
Member Author

Choose a reason for hiding this comment

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

updated, thanks for raising

So far the scheduler priority is set to default which is 0 this is risky
especially when the preemtion of pods is needed to fit more important pods.

The NRS is important enough to deserve the most critical priority class
system-node-critical which is the same priority for the
kube-scheduler. We need this priority set always regardless how many
replicas are set for the scheduler, and especially if we look to
optimize the HA of the scheduler.

We choose system-node-critical over system-cluster-critical because we don't want to allow SS preemption by higher-priority pods. If it was set to system-cluster-critical and an event is triggered that requires pod eviction, which would be for scheduling system-node-critical workloads, the SS would be at risk of being evicted. although this would be very rare and the evicted pod will be rescheduled, there is no convincing reason not to make it node-critical.

addresses openshift-kni#974

Signed-off-by: Shereen Haj <[email protected]>
@shajmakh
Copy link
Member Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 12, 2024
Copy link
Member

@ffromani ffromani left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

thanks!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 12, 2024
Copy link
Contributor

openshift-ci bot commented Aug 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ffromani, shajmakh

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

@openshift-merge-bot openshift-merge-bot bot merged commit 08a0929 into openshift-kni:main Aug 12, 2024
13 checks passed
@shajmakh
Copy link
Member Author

/cherry-pick release-4.16

@openshift-cherrypick-robot

@shajmakh: #979 failed to apply on top of branch "release-4.16":

Applying: sched: controller: set scheduler priority
Using index info to reconstruct a base tree...
M	controllers/numaresourcesscheduler_controller.go
Falling back to patching base and 3-way merge...
Auto-merging controllers/numaresourcesscheduler_controller.go
CONFLICT (content): Merge conflict in controllers/numaresourcesscheduler_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 sched: controller: set scheduler priority
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.16

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.

shajmakh added a commit to shajmakh/numaresources-operator that referenced this pull request Aug 13, 2024
Manual backport of openshift-kni#979

Signed-off-by: Shereen Haj <[email protected]>
@ffromani ffromani added cherry-pick-candidate Possible cherry-pick in the future cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. labels Aug 13, 2024
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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cherry-pick-candidate Possible cherry-pick in the future lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants