From 58ddffdbaece54edf37f56a4cf0381a2dc462ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Tich=C3=A1k?= Date: Sat, 19 Oct 2024 16:56:47 +0200 Subject: [PATCH] reset deploymentSuccess variable in between retries --- core/task/manager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/task/manager.go b/core/task/manager.go index 3ff33f45..bdabb592 100644 --- a/core/task/manager.go +++ b/core/task/manager.go @@ -504,6 +504,9 @@ func (m *Manager) acquireTasks(envId uid.ID, taskDescriptors Descriptors) (err e // The request object is used to pass the tasks to deploy and the outcome // channel to the deployment routine. + // reset variables in between retries + deploymentSuccess = true + outcomeCh := make(chan ResourceOffersOutcome) m.tasksToDeploy <- &ResourceOffersDeploymentRequest{ tasksToDeploy: tasksToRun, @@ -587,6 +590,9 @@ func (m *Manager) acquireTasks(envId uid.ID, taskDescriptors Descriptors) (err e } } break DEPLOYMENT_ATTEMPTS_LOOP + } else { + log.WithField("partition", envId). + Errorf("Attempt number %d/%d failed, but we are retrying...", attemptCount+1, MAX_ATTEMPTS_PER_DEPLOY_REQUEST) } } }