-
Notifications
You must be signed in to change notification settings - Fork 64
simplify acc logic #451
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
simplify acc logic #451
Conversation
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.
Small nitpick, looking good otherwise
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 think the PR makes unintended changes to the computation in Dispatcher mode. In dispatcher mode and if strings.Compare(dispatchedAgentId, agentId) == 0
we should add the aggregated AW request to preemptable
if we want to preserve the existing behavior.
if strings.Compare(dispatchedAgentId, agentId) != 0 {
klog.V(10).Infof("[getAggAvaiResPri] %s: Skipping adjustments for %s since it is in cluster %s which is not in the same cluster under evaluation: %s.",
time.Now().String(), value.Name, dispatchedAgentId, agentId)
continue
} else {
for _, resctrl := range qjm.qjobResControls {
qjv := resctrl.GetAggregatedResources(value)
preemptable = preemptable.Add(qjv)
}
for _, genericItem := range value.Spec.AggrResources.GenericItems {
qjv, _ := genericresource.GetResources(&genericItem)
preemptable = preemptable.Add(qjv)
}
continue
}
No changes were done for dispatcher mode and I would avoid doing it as there are no test cases yet AFAIK |
OK. You are right, the problematic changes were in fact made in PR #415. I was looking at the combination of the two PRs. We'll address these changes separately. |
No description provided.