Skip to content

Commit

Permalink
fix: better error message for multiple workflow controllers running (#…
Browse files Browse the repository at this point in the history
…13760)

Signed-off-by: Greg Sheremeta <gshereme@redhat.com>
  • Loading branch information
gregsheremeta authored Oct 24, 2024
1 parent b49e88e commit 49ff7a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion workflow/controller/workflowpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 49ff7a4

Please sign in to comment.