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

Add container exit error code between ADD and ContainerDied #95932

Closed
karan opened this issue Oct 27, 2020 · 10 comments
Closed

Add container exit error code between ADD and ContainerDied #95932

karan opened this issue Oct 27, 2020 · 10 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@karan
Copy link
Contributor

karan commented Oct 27, 2020

What would you like to be added:

Between

SyncLoop (ADD, "api")

and

SyncLoop (PLEG): "foo(96eb6e9d-84cf-12ea-b64a-42010a80005d)", event: &pleg.PodLifecycleEvent{ID:"96eb6e9d-84cf-12ea-b64a-42010a80005d", Type:"ContainerStarted", Data:"bar"}

and

SyncLoop (PLEG): "foo(96eb6e9d-84cf-12ea-b64a-42010a80005d)", event: &pleg.PodLifecycleEvent{ID:"96eb6e9d-84cf-12ea-b64a-42010a80005d", Type:"ContainerDied", Data:"bar"}

We can't tell if container died with a status error (we can by looking at containerd logs though).

Why is this needed:

It would make debugging dying containers much easier.

@karan karan added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 27, 2020
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Oct 27, 2020
@k8s-ci-robot
Copy link
Contributor

@karan: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 27, 2020
@karan
Copy link
Contributor Author

karan commented Oct 27, 2020

/sig node

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 27, 2020
@AkashSarda
Copy link
Contributor

/assign

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 5, 2021
@SergeyKanzhelev
Copy link
Member

/cc

@adisky
Copy link
Contributor

adisky commented Feb 26, 2021

/remove-lifecycle stale
/assign

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 26, 2021
@adisky
Copy link
Contributor

adisky commented Feb 26, 2021

@karan I am new to kubelet code, trying to understand.
IIUC, PLEG does not passes exitCode in the generated events, one way is to pass the exit code in events generated.

for _, container := range allContainers {
events := computeEvents(oldPod, pod, &container.ID)

other way is to get the exit code from podCache before logging which return pod status.

if pod, ok := kl.podManager.GetPodByUID(e.ID); ok {
klog.V(2).Infof("SyncLoop (PLEG): %q, event: %#v", format.Pod(pod), e)
handler.HandlePodSyncs([]*v1.Pod{pod})
} else {

@Dragoncell
Copy link
Member

/assign

@adisky
Copy link
Contributor

adisky commented May 19, 2021

closing this issue, as It has been fixed by #99880
/close

@k8s-ci-robot
Copy link
Contributor

@adisky: Closing this issue.

In response to this:

closing this issue, as It has been fixed by #99880
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

No branches or pull requests

7 participants