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: Mutex not being released on step completion #4847

Merged
merged 7 commits into from
Jan 19, 2021

Conversation

sarabala1979
Copy link
Member

@sarabala1979 sarabala1979 commented Jan 8, 2021

Checklist:

Fixes #4832
Fixes #4870

@alexec
Copy link
Contributor

alexec commented Jan 8, 2021

I feel like we're playing whack-a-mole with these bugs. Just another push to see if there is a more general way we could periodically check semaphore are consistent?

@sarabala1979
Copy link
Member Author

I feel like we're playing whack-a-mole with these bugs. Just another push to see if there is a more general way we could periodically check semaphore are consistent?

This fix requires cleaning up the template level lock release.
As we discussed, we need to monitor periodically all workflows status which is holding or waiting for locks. This will handle the missed workflow notifications

@@ -1691,6 +1691,9 @@ func (woc *wfOperationCtx) executeTemplate(nodeName string, orgTmpl wfv1.Templat
woc.computeMetrics(processedTmpl.Metrics.Prometheus, localScope, realTimeScope, false)
}
}
if processedTmpl.Synchronization != nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

Node status will be calculated here for retry nodes. The lock has to be released if the node is fulfilled

@@ -155,6 +155,7 @@ func (cm *Manager) Release(wf *wfv1.Workflow, nodeName string, syncRef *wfv1.Syn

if syncLockHolder, ok := cm.syncLockMap[lockName.EncodeName()]; ok {
syncLockHolder.release(holderKey)
syncLockHolder.removeFromQueue(holderKey)
Copy link
Member Author

@sarabala1979 sarabala1979 Jan 14, 2021

Choose a reason for hiding this comment

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

This is mainly for edge cases to avoid the release node shouldn't be in pending state.

@sarabala1979 sarabala1979 marked this pull request as ready for review January 15, 2021 21:49
Copy link
Member

@simster7 simster7 left a comment

Choose a reason for hiding this comment

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

Rubber-stamp

@sarabala1979 sarabala1979 merged commit 929cd50 into argoproj:master Jan 19, 2021
@@ -37,3 +37,5 @@ git-ask-pass.sh
/go-diagrams/
/.run/
pprof
pkg/apiclient/sensor/sensor.swagger.json
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicate lines

@simster7 simster7 mentioned this pull request Jan 19, 2021
17 tasks
@simster7
Copy link
Member

@simster7 simster7 mentioned this pull request Jan 25, 2021
19 tasks
@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.

semaphore not be released when step is finished Mutex not being released on step completion
3 participants