From 49ff7a44ba307416282a1f5cd3b844d19bce7f88 Mon Sep 17 00:00:00 2001 From: Greg Sheremeta Date: Thu, 24 Oct 2024 16:36:23 -0400 Subject: [PATCH] fix: better error message for multiple workflow controllers running (#13760) Signed-off-by: Greg Sheremeta --- workflow/controller/workflowpod.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/workflow/controller/workflowpod.go b/workflow/controller/workflowpod.go index b63ff6345ef8..9a7a32c0c2fb 100644 --- a/workflow/controller/workflowpod.go +++ b/workflow/controller/workflowpod.go @@ -566,7 +566,9 @@ func (woc *wfOperationCtx) podExists(nodeID string) (existing *apiv1.Pod, exists } if objectCount > 1 { - return nil, false, fmt.Errorf("expected < 2 pods, got %d - this is a bug", len(objs)) + return nil, false, fmt.Errorf("expected 1 pod, got %d. This can happen when multiple workflow-controller "+ + "pods are running and both reconciling this Workflow. Check your Argo Workflows installation for a rogue "+ + "workflow-controller. Otherwise, this is a bug", len(objs)) } if existing, ok := objs[0].(*apiv1.Pod); ok {