From 0b816f26cf705be2dde67e140ef01ee136eea378 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 4 Sep 2024 14:44:29 +0200 Subject: pkg/manager: properly handle NeedRepro() == false It was processed incorrectly in the repro loop - we should have skipped that crash and looked for another one, but we actually ignored its return value. --- pkg/manager/repro.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pkg/manager/repro.go') diff --git a/pkg/manager/repro.go b/pkg/manager/repro.go index 9858a4629..7a50f06ab 100644 --- a/pkg/manager/repro.go +++ b/pkg/manager/repro.go @@ -197,8 +197,12 @@ func (r *ReproLoop) Loop(ctx context.Context) { case <-ctx.Done(): return } - if crash == nil || !r.mgr.NeedRepro(crash) { - continue + if crash != nil && !r.mgr.NeedRepro(crash) { + crash = nil + // Now we might not need that many VMs. + r.mu.Lock() + r.adjustPoolSizeLocked() + r.mu.Unlock() } } -- cgit mrf-deployment