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(executor): Fixed waitMainContainerStart returning prematurely. Closes #4599 #4601

Merged
merged 4 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Currently, the following organizations are **officially** using Argo Workflows:
1. [SAP Fieldglass](https://www.fieldglass.com/)
1. [SAP Hybris](https://cx.sap.com/)
1. [SAS](https://www.sas.com/)
1. [Schlumberger](https://slb.com/)
1. [SegmentStream](https://segmentstream.com)
1. [Sidecar Technologies](https://hello.getsidecar.com/)
1. [Sohu](https://www.sohu.com/)
Expand Down
10 changes: 5 additions & 5 deletions workflow/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1082,13 +1082,13 @@ func (we *WorkflowExecutor) waitMainContainerStart() (string, error) {
for _, ctrStatus := range pod.Status.ContainerStatuses {
if ctrStatus.Name == common.MainContainerName {
log.Debug(ctrStatus)
if ctrStatus.ContainerID != "" {
we.mainContainerID = containerID(ctrStatus.ContainerID)
return containerID(ctrStatus.ContainerID), nil
if ctrStatus.State.Waiting != nil {
// main container is still in waiting status
} else if ctrStatus.State.Waiting == nil && ctrStatus.State.Running == nil && ctrStatus.State.Terminated == nil {
// status still not ready, wait
} else if ctrStatus.State.Waiting != nil {
// main container is still in waiting status
} else if ctrStatus.ContainerID != "" {
we.mainContainerID = containerID(ctrStatus.ContainerID)
return containerID(ctrStatus.ContainerID), nil
} else {
// main container in running or terminated state but missing container ID
return "", errors.InternalError("Main container ID cannot be found")
Expand Down