aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/manager/repro.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-09-04 14:44:29 +0200
committerAleksandr Nogikh <nogikh@google.com>2024-09-04 14:21:04 +0000
commit0b816f26cf705be2dde67e140ef01ee136eea378 (patch)
tree4c8c70ef027001756e2b9934279fc974c6f3e76e /pkg/manager/repro.go
parent9d47f20a1c5cfc0e89b8e37d0175d69be81ad9a9 (diff)
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.
Diffstat (limited to 'pkg/manager/repro.go')
-rw-r--r--pkg/manager/repro.go8
1 files changed, 6 insertions, 2 deletions
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()
}
}