elihschiff opened a new pull request, #521: URL: https://github.com/apache/yunikorn-core/pull/521
### What is this PR for? In YUNIKORN-1559 I am trying to add a `pods=1` resource to all pods during scheduling. During gang scheduling, for resources that do not have a value set explicitly on the queue, yunikorn fails to schedule them correctly. Imagine a queue with vcore set as 100 and memory set as 100Gi. Now imagine a cluster where there are more than enough running nodes to fit pods up to the queue limit. If we try and schedule 10 pods with vcore=10, memory=10Gi, and pods=1. While the queue does not explicitly have a `pods` resource limit set, yunikorn uses this code to ignore that and schedule all 10 based on the fact that the vcore/memory are below the limit. https://github.com/apache/yunikorn-core/blob/1e7d249631bab0f91438d87d3d9efb40a3e2a364/pkg/common/resources/resources.go#L435-L438 However, if there are not enough nodes yet, we see the problem this PR is trying to address. Yunikorn does take into account the `pods` value when determining if a pod should be set to tell the cluster autoscaler to scale up. This means that pods will never scale up new nodes. One other note, this issue can be seen without the need for a `pods` resource. For example, create a queue with just `vcore` set and no value for `memory` set. Then try and schedule more resource that nodes that exist in a cluster, but fewer resources that the vcore limit on that queue. Those pods will not scale up new resources (unless you apply this PR's change first) ### What type of PR is it? * [x] - Bug Fix * [ ] - Improvement * [ ] - Feature * [ ] - Documentation * [ ] - Hot Fix * [ ] - Refactoring ### Todos * [ ] - Task ### What is the Jira issue? https://issues.apache.org/jira/browse/YUNIKORN-1559 ### How should this be tested? I attempted to test this in my k8s cluster along with my yunikorn-k8shims change (PR incoming, will updated with link later), that said I dont know if there are potential other issues I dont know about. I am still a beginner with yunikorn's codebase and I very likely could have missed something important. ### Screenshots (if appropriate) ### Questions: * [ ] - The licenses files need update. * [ ] - There is breaking changes for older versions. * [ ] - It needs documentation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
