-
Notifications
You must be signed in to change notification settings - Fork 976
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
fix: issue#1261 config "overcommit-factor" less than 1 leads scheduler crash #1267
Conversation
7f0943d
to
d957dae
Compare
if factor < minOverCommitFactor { | ||
factor = minOverCommitFactor | ||
} | ||
|
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.
Could you add a unit test for that
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've added ut just now.
d957dae
to
77fd010
Compare
New changes are detected. LGTM label has been removed. |
b415434
to
00df8bd
Compare
Signed-off-by: huone1 <huwanxing@huawei.com>
00df8bd
to
e5faa64
Compare
@@ -34,6 +34,7 @@ tiers: | |||
- plugins: | |||
- name: priority | |||
- name: gang | |||
- name: conformance | |||
- plugins: | |||
- name: drf | |||
- name: predicates |
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.
binpack
is also needed
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 was attend to add binpack because it is not fit all scenarios, so it wasn't added.
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.
The default cm under installer/volcano-development.yaml
contains binpack
, maybe we should remove binpack
in that file?
|
||
"volcano.sh/volcano/pkg/scheduler/conf" | ||
"volcano.sh/volcano/pkg/webhooks/router" | ||
) |
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.
dependency order needed to formated?
|
||
/* | ||
allow config to create and update when | ||
1. configmap name must be "volcano-scheduler-configmap" |
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.
l think volcano-scheduler-configmap
is not a necessity, it's defined by user
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 check helm files , you're right。
configmap name Transfer to admission webhook through ENV , is it OK ??
@@ -0,0 +1,43 @@ | |||
package validate |
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.
The functions in this file should already exist in codebase?
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.
yes , but it is in scheduler folder, so I repeat some
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: huone1 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 |
confKey := "" | ||
confNum := 0 | ||
for key := range cm.Data { | ||
if strings.HasSuffix(key, ".conf") { |
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.
also .conf
is not a necessity
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.
1,it watch all configmap, we must filter them, so it is necessary to adjust the configmap name
2。i think it is necessary to certain restrictions on the format of scheduler configmap data
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.
Okay got it, I have no opinion on this change, but this introduces some name restrictions indeed.
/hold |
prefer not to check scheduler's arguments in webhook. |
Another way : scheduler process gets the scheduler's arguments to check them, and if one arguments is illegal,reset it to default val; |
That's better to me, please also record an event and log for that :) |
the question is resloved by #1324 , so closed it |
kaihua give better advice: check OverCommitFactor in webhook validate。
so add webhook validate ,just for scheduler configmap;
currently, there are only some check for enqueue action, and add other actions or plugins ‘s check to it in future
Signed-off-by: huone1 huwanxing@huawei.com