Merge pull request #106727 from MikeSpreitzer/fix-106726

Correct Generator calls for executing seat count

Kubernetes-commit: fbdd0d7b4165bc5a677d45e4dc693e3260297bfa
This commit is contained in:
Kubernetes Publisher 2021-12-07 18:27:38 -08:00
commit 42a970a106
3 changed files with 6 additions and 6 deletions

4
go.mod
View File

@ -44,7 +44,7 @@ require (
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/square/go-jose.v2 v2.2.2
k8s.io/api v0.0.0-20211203085948-25b7aa9e86de
k8s.io/apimachinery v0.0.0-20211208045959-7d2b7437cbee
k8s.io/apimachinery v0.0.0-20211208045959-67ffd82e6cff
k8s.io/client-go v0.0.0-20211208050435-c713f38723cb
k8s.io/component-base v0.0.0-20211203092501-60bec488f080
k8s.io/klog/v2 v2.30.0
@ -58,7 +58,7 @@ require (
replace (
k8s.io/api => k8s.io/api v0.0.0-20211203085948-25b7aa9e86de
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211208045959-7d2b7437cbee
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20211208045959-67ffd82e6cff
k8s.io/client-go => k8s.io/client-go v0.0.0-20211208050435-c713f38723cb
k8s.io/component-base => k8s.io/component-base v0.0.0-20211203092501-60bec488f080
)

4
go.sum
View File

@ -955,8 +955,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.0.0-20211203085948-25b7aa9e86de h1:sonP3TZF8wLYB7pZ9U+cFOmU+aowMk08AOJQLLLlE+c=
k8s.io/api v0.0.0-20211203085948-25b7aa9e86de/go.mod h1:UuggGDUdGB3f6prC8FzrBGPJ+A+oIqVWmF5HV1VeEIM=
k8s.io/apimachinery v0.0.0-20211208045959-7d2b7437cbee h1:Nt6248gYjjhvk3fR8nfsX4MzeaE0DHe0aaA8RygUKIs=
k8s.io/apimachinery v0.0.0-20211208045959-7d2b7437cbee/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc=
k8s.io/apimachinery v0.0.0-20211208045959-67ffd82e6cff h1:YOhVGWI7F5otLrzreq4Y6tekYpXBx5P/Te6Y+ac6ymE=
k8s.io/apimachinery v0.0.0-20211208045959-67ffd82e6cff/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc=
k8s.io/client-go v0.0.0-20211208050435-c713f38723cb h1:tbntDZ7c+LkEPnURV1oMy9HtSAU7vag2pDilT68PBLg=
k8s.io/client-go v0.0.0-20211208050435-c713f38723cb/go.mod h1:4l8IJYdxbF/Uo0zdB+OB48wOhs2/7FtuppsKYTXj1Fw=
k8s.io/component-base v0.0.0-20211203092501-60bec488f080 h1:G2FyK080Yrlu0bZrru3nchG0ABRGFNaRIet230edgtw=

View File

@ -539,7 +539,7 @@ func (meal *cfgMeal) digestNewPLsLocked(newPLs []*flowcontrol.PriorityLevelConfi
state := meal.cfgCtlr.priorityLevelStates[pl.Name]
if state == nil {
labelValues := []string{pl.Name}
state = &priorityLevelState{reqsObsPair: meal.cfgCtlr.reqsObsPairGenerator.Generate(1, 1, labelValues), execSeatsObs: meal.cfgCtlr.execSeatsObsGenerator.Generate(1, 1, labelValues)}
state = &priorityLevelState{reqsObsPair: meal.cfgCtlr.reqsObsPairGenerator.Generate(1, 1, labelValues), execSeatsObs: meal.cfgCtlr.execSeatsObsGenerator.Generate(0, 1, labelValues)}
}
qsCompleter, err := queueSetCompleterForPL(meal.cfgCtlr.queueSetFactory, state.queues, pl, meal.cfgCtlr.requestWaitLimit, state.reqsObsPair, state.execSeatsObs)
if err != nil {
@ -769,7 +769,7 @@ func (meal *cfgMeal) imaginePL(proto *flowcontrol.PriorityLevelConfiguration, re
klog.V(3).Infof("No %s PriorityLevelConfiguration found, imagining one", proto.Name)
labelValues := []string{proto.Name}
reqsObsPair := meal.cfgCtlr.reqsObsPairGenerator.Generate(1, 1, labelValues)
execSeatsObs := meal.cfgCtlr.execSeatsObsGenerator.Generate(1, 1, labelValues)
execSeatsObs := meal.cfgCtlr.execSeatsObsGenerator.Generate(0, 1, labelValues)
qsCompleter, err := queueSetCompleterForPL(meal.cfgCtlr.queueSetFactory, nil, proto, requestWaitLimit, reqsObsPair, execSeatsObs)
if err != nil {
// This can not happen because proto is one of the mandatory