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

Preserve log data for destroyed pod #6725

Closed
mnaughto opened this issue Jan 19, 2016 · 11 comments
Closed

Preserve log data for destroyed pod #6725

mnaughto opened this issue Jan 19, 2016 · 11 comments

Comments

@mnaughto
Copy link

Is there any way that things could be tweaked so that I can go into Browse->Pods->(frequently crashing pod)->Logs and view the latest log or a history of logs between restarts? This would make it easier to determine the cause of a problem.

Right now, the only way to see the log of a crashing pod is to scale it to zero, scale it up, click on the pod count, click on the pod, and click on logs, all hopefully before it restarts again.

Ideally, I'd be able to view either a history of failure logs or the most recent failure log, rather than getting the message saying "An error occurred loading the log."

Does this all make sense?

@deads2k
Copy link
Contributor

deads2k commented Jan 19, 2016

Take a look at oc logs -p. I think it does exactly what you want, "view logs for the previous instance of the container".

@mnaughto
Copy link
Author

Got it. It'd be nice if that could make its way into the web interface at some point (I guess that's what I'm requesting here).

@deads2k
Copy link
Contributor

deads2k commented Jan 20, 2016

Got it. It'd be nice if that could make its way into the web interface at some point (I guess that's what I'm requesting here).

/cc @jwforres

@jwforres
Copy link
Member

There is a k8s issue open related to this, the API needs to add a flag that will always return the logs for the latest container that was run / is running, the web console will update to always send that flag.

@benjaminapetersen
Copy link
Contributor

@jwforres do you remember which issue? I took a stab at finding it to add a reference here but was not able to land on it.

@jwforres
Copy link
Member

@benjaminapetersen i dont, @smarterclayton mentioned there was one, but not what it was

@smarterclayton
Copy link
Contributor

smarterclayton commented Jan 20, 2016 via email

@mnaughto
Copy link
Author

This is all I could find that seemed related: kubernetes/kubernetes#13780

There's also this (linked to in that pull request): #3943

@jwforres
Copy link
Member

Maybe this? kubernetes/kubernetes#15826

@jwforres
Copy link
Member

according to @smarterclayton the fix is that the API server is going to return the latest available container log, whether that container has already died or is currently running. so we'll need that fix rebased from kube

@spadgett
Copy link
Member

Looks like this is fixed after the last rebase.

logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants