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(controller): Fix node status when daemon pod deleted but its children nodes are still running #4683

Merged
merged 9 commits into from Jan 13, 2021

Conversation

lonsdale8734
Copy link
Contributor

Checklist:

@simster7 simster7 self-assigned this Dec 9, 2020
Comment on lines +694 to +697
node := d.getTaskNode(taskName)
if node != nil {
return true, true, nil
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this particular change more? Not sure if we want this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case for this code is "explained" in the unittest.

@@ -917,6 +917,7 @@ func (woc *wfOperationCtx) podReconciliation() error {

node.Message = "pod deleted"
node.Phase = wfv1.NodeError
node.Daemoned = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this needed for please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When daemon pod deleted and Daemoned flag in node is true, there is a bug that the Deaemoned flag never removed and the whole workflow will never completed.

@@ -1069,6 +1070,7 @@ func (woc *wfOperationCtx) assessNodeStatus(pod *apiv1.Pod, node *wfv1.NodeStatu
if pod.DeletionTimestamp != nil {
// pod is being terminated
newPhase = wfv1.NodeError
newDaemonStatus = pointer.BoolPtr(false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and the purpose of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@lonsdale8734 lonsdale8734 changed the title Fix daemon pod deleted fix(controller): Fix node status when daemon pod deleted but its children nodes are still running Dec 21, 2020
@simster7 simster7 merged commit 2ff11cc into argoproj:master Jan 13, 2021
simster7 pushed a commit that referenced this pull request Jan 19, 2021
…dren nodes are still running (#4683)

Signed-off-by: lons <lonsdale8734@gmail.com>
@simster7
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants