Skip to content

Commit 0ac1bc7

Browse files
authored
Merge pull request #965 from askervin/5MQ_podpools_fix_start_sync
podpools: fix synchronizing all running containers at start
2 parents b2adb1e + 90b28a5 commit 0ac1bc7

File tree

2 files changed

+4
-2
lines changed
  • pkg/cri/resource-manager/policy/builtin/podpools
  • test/e2e/policies.test-suite/podpools/n4c16/test06-prometheus-metrics

2 files changed

+4
-2
lines changed

pkg/cri/resource-manager/policy/builtin/podpools/podpools-policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func (p *podpools) Description() string {
178178
// Start prepares this policy for accepting allocation/release requests.
179179
func (p *podpools) Start(add []cache.Container, del []cache.Container) error {
180180
log.Info("%s policy started", PolicyName)
181-
return p.Sync(add, del)
181+
return p.Sync(p.cch.GetContainers(), del)
182182
}
183183

184184
// Sync synchronizes the active policy state.

test/e2e/policies.test-suite/podpools/n4c16/test06-prometheus-metrics/code.var.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ CPUREQ="" CPULIM=""
9797
namespace=kube-system CONTCOUNT=3 create podpools-busybox
9898
report allowed
9999
vm-command "curl --silent $metrics_url | grep -v ^cgroup_"
100-
verify-log-vs-metrics pod5:pod5c1 0 20
100+
# There should be kube-apiserver, etcd etc. running on reserved CPUs as well,
101+
# therefore allow a lot of CPU usage yet pod5 is not doing anything.
102+
verify-log-vs-metrics pod5:pod5c1 0 100
101103

102104
cleanup

0 commit comments

Comments
 (0)