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: Ensure ContainerStatus in PNS is terminated before continuing #4469

Merged
merged 6 commits into from
Nov 10, 2020

Conversation

simster7
Copy link
Member

@simster7 simster7 commented Nov 5, 2020

Fixes: #4406

Signed-off-by: Simon Behar [email protected]

Checklist:

workflow/executor/pns/pns.go Outdated Show resolved Hide resolved
@simster7 simster7 marked this pull request as ready for review November 6, 2020 13:38
@alexec alexec self-assigned this Nov 9, 2020
func (p *PNSExecutor) GetTerminatedContainerStatus(containerID string) (*corev1.Pod, *corev1.ContainerStatus, error) {
var pod *corev1.Pod
var containerStatus *corev1.ContainerStatus
err := wait.Poll(1*time.Second, 3*time.Second, func() (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this try 3 times over 3 seconds?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct. According to my manual testing, this should succeed on the first try around 95% of the time. It should almost always succeed by the second try.

@simster7 simster7 merged commit 465447c into argoproj:master Nov 10, 2020
alexcapras pushed a commit to alexcapras/argo that referenced this pull request Nov 12, 2020
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.

exitCode grabbing not working for PNS executor
2 participants