[
https://issues.apache.org/jira/browse/YUNIKORN-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter Bacsko updated YUNIKORN-2661:
-----------------------------------
Description:
Inside the UGM code {{setLimit()}}, we don't pass down {{doWildcardCheck}}, so
this variables never reaches the leafs:
{noformat}
/ Note: Lock free call. The Lock of the linked tracker (UserTracker and
GroupTracker) should be held before calling this function.
func (qt *QueueTracker) setLimit(hierarchy []string, maxResource
*resources.Resource, maxApps uint64, useWildCard bool, trackType trackingType,
doWildCardCheck bool) {
log.Log(log.SchedUGM).Debug("Setting limits",
zap.String("queue path", qt.queuePath),
zap.Strings("hierarchy", hierarchy),
zap.Uint64("max applications", maxApps),
zap.Stringer("max resources", maxResource),
zap.Bool("use wild card", useWildCard))
// depth first: all the way to the leaf, create if not exists
// more than 1 in the slice means we need to recurse down
if len(hierarchy) > 1 {
childName := hierarchy[1]
if qt.childQueueTrackers[childName] == nil {
qt.childQueueTrackers[childName] =
newQueueTracker(qt.queuePath, childName, trackType)
}
qt.childQueueTrackers[childName].setLimit(hierarchy[1:],
maxResource, maxApps, useWildCard, trackType, false) <-- should be
"doWildCardCheck" not "false"
...
{noformat}
Fix this and create a unit test for {{setLimit()}}.
was:
Inside the UGM code {{setLimit()}}, we don't pass down {{doWildcardCheck}}, so
this variables never reaches the leafs:
{noformat}
/ Note: Lock free call. The Lock of the linked tracker (UserTracker and
GroupTracker) should be held before calling this function.
func (qt *QueueTracker) setLimit(hierarchy []string, maxResource
*resources.Resource, maxApps uint64, useWildCard bool, trackType trackingType,
doWildCardCheck bool) {
log.Log(log.SchedUGM).Debug("Setting limits",
zap.String("queue path", qt.queuePath),
zap.Strings("hierarchy", hierarchy),
zap.Uint64("max applications", maxApps),
zap.Stringer("max resources", maxResource),
zap.Bool("use wild card", useWildCard))
// depth first: all the way to the leaf, create if not exists
// more than 1 in the slice means we need to recurse down
if len(hierarchy) > 1 {
childName := hierarchy[1]
if qt.childQueueTrackers[childName] == nil {
qt.childQueueTrackers[childName] =
newQueueTracker(qt.queuePath, childName, trackType)
}
qt.childQueueTrackers[childName].setLimit(hierarchy[1:],
maxResource, maxApps, useWildCard, trackType, false)
...
{noformat}
Fix this and create a unit test for {{setLimit()}}.
> Fix hard-coded boolean in setLimit
> ----------------------------------
>
> Key: YUNIKORN-2661
> URL: https://issues.apache.org/jira/browse/YUNIKORN-2661
> Project: Apache YuniKorn
> Issue Type: Bug
> Components: core - scheduler
> Reporter: Peter Bacsko
> Assignee: Peter Bacsko
> Priority: Major
>
> Inside the UGM code {{setLimit()}}, we don't pass down {{doWildcardCheck}},
> so this variables never reaches the leafs:
> {noformat}
> / Note: Lock free call. The Lock of the linked tracker (UserTracker and
> GroupTracker) should be held before calling this function.
> func (qt *QueueTracker) setLimit(hierarchy []string, maxResource
> *resources.Resource, maxApps uint64, useWildCard bool, trackType
> trackingType, doWildCardCheck bool) {
> log.Log(log.SchedUGM).Debug("Setting limits",
> zap.String("queue path", qt.queuePath),
> zap.Strings("hierarchy", hierarchy),
> zap.Uint64("max applications", maxApps),
> zap.Stringer("max resources", maxResource),
> zap.Bool("use wild card", useWildCard))
> // depth first: all the way to the leaf, create if not exists
> // more than 1 in the slice means we need to recurse down
> if len(hierarchy) > 1 {
> childName := hierarchy[1]
> if qt.childQueueTrackers[childName] == nil {
> qt.childQueueTrackers[childName] =
> newQueueTracker(qt.queuePath, childName, trackType)
> }
> qt.childQueueTrackers[childName].setLimit(hierarchy[1:],
> maxResource, maxApps, useWildCard, trackType, false) <-- should be
> "doWildCardCheck" not "false"
> ...
> {noformat}
> Fix this and create a unit test for {{setLimit()}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]