Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Consider support multi-containers pod error code handling #776

Closed
hzxuzhonghu opened this issue Apr 15, 2019 · 4 comments
Closed

Consider support multi-containers pod error code handling #776

hzxuzhonghu opened this issue Apr 15, 2019 · 4 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. sig/apps Categorizes an issue or PR as relevant to SIG Apps.

Comments

@hzxuzhonghu
Copy link
Contributor

Currently, the LifecyclePolicy.ExitCode only takes the first container exit code of the pod.

So if users have multi-containers pod, it is impossible for them to specify the error handling behavior for each container in a pod.

I'd suggest to update the LifecyclePolicy API. Since ExitCode is just added, I think it is of little risk to do it now.

@hzxuzhonghu
Copy link
Contributor Author

The initial thought

type LifecyclePolicy struct {
	ExitCode []ExitCode
}

type ExitCode struct {
      containerName string
      code *int32
}

@k82cn
Copy link
Contributor

k82cn commented Apr 15, 2019

/kind feature
/sig apps

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. sig/apps Categorizes an issue or PR as relevant to SIG Apps. labels Apr 15, 2019
@TommyLike
Copy link
Contributor

Do we care about any case of the exitCode or we just care about if there are any unsuccessful exitCode among the containers?

@hzxuzhonghu
Copy link
Contributor Author

Honestly, in normal case i think it is not necessary. This is a advanced feature, maybe useful for those jobs that have some dependencies, for example a training job may return code x when the model data is unavailable, and return y when the data is of invalid format, return z when a temporary network connection err, etc.

@k82cn k82cn closed this as completed Apr 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. sig/apps Categorizes an issue or PR as relevant to SIG Apps.
Projects
None yet
Development

No branches or pull requests

4 participants