Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only cleanup agent pod if exists #12679

Closed
wants to merge 3 commits into from
Closed

Conversation

tooptoop4
Copy link
Contributor

Fixes #12659

@agilgur5 agilgur5 added the area/controller Controller issues, panics label Feb 18, 2024
@jswxstw
Copy link
Member

jswxstw commented Feb 21, 2024

The agent pod deletion logic is currently performed in markWorkflowPhase and the PodGC strategy is invalid to the agent pod, so I think it is more appropriate to put it into queuePodsForCleanup.

func (woc *wfOperationCtx) markWorkflowPhase(ctx context.Context, phase wfv1.WorkflowPhase, message string) {

func (woc *wfOperationCtx) queuePodsForCleanup() {

@jswxstw
Copy link
Member

jswxstw commented Feb 21, 2024

The agent pod deletion logic is currently performed in markWorkflowPhase and the PodGC strategy is invalid to the agent pod, so I think it is more appropriate to put it into queuePodsForCleanup.

func (woc *wfOperationCtx) markWorkflowPhase(ctx context.Context, phase wfv1.WorkflowPhase, message string) {

func (woc *wfOperationCtx) queuePodsForCleanup() {

One thing to note is that the agent pod cleanup policy depends on workflowPhase rather than nodePhase.

condition with podGC strategy and workflowPhase pod cleanup action
(OnPodCompletion || OnPodSuccess || OnWorkflowCompletion) && workflowPhase.Completed() deletePod
OnWorkflowSuccess && WorkflowSucceeded deletePod
[Default]workflowPhase.Completed() labelPodCompleted&&terminateContainers

@agilgur5 agilgur5 added problem/more information needed Not enough information has been provide to diagnose this issue. area/agent Argo Agent that runs for HTTP and Plugin templates labels Apr 19, 2024

This comment was marked as resolved.

@github-actions github-actions bot added the problem/stale This has not had a response in some time label May 11, 2024

This comment was marked as resolved.

@github-actions github-actions bot closed this May 25, 2024
@agilgur5
Copy link

agilgur5 commented May 29, 2024

Superseded by #13016. EDIT: Split to #13294

@agilgur5 agilgur5 added solution/superseded This PR or issue has been superseded by another one (slightly different from a duplicate) and removed problem/stale This has not had a response in some time problem/more information needed Not enough information has been provide to diagnose this issue. labels May 29, 2024
@argoproj argoproj locked as resolved and limited conversation to collaborators Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/agent Argo Agent that runs for HTTP and Plugin templates area/controller Controller issues, panics solution/superseded This PR or issue has been superseded by another one (slightly different from a duplicate)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

controller sending many pod delete requests that result in 404 response
3 participants