-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Workspace start in debug mode -> watch the logs #15983
Comments
@sparkoo |
@tolusha I'm afraid it's not implemented in java client :( this is only API I've found https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/LogWatch.java where |
yes, here all logs are written directly to |
I think this is a great idea. |
@RickJWagner as much as I agree with you, it is out of the scope of this issue. This is about grabbing the logs from containers (that already exists) and make them visible for the user, which is now very hard to impossible to reach. Also, we often don't have a control over the logs, because we're just resending logs from kubernetes, theia, or other components. |
@RickJWagner
|
Hi @tolusha For example, imagine if we did not see this full list of events. Let's say the last event we saw was the second line, 'Created container che-devfile-registry', how would we know what kind of problem has occurred? We would not know that we failed when we tried to start the container, because we did not signal our intention before we started the action. This group of events would not be helpful in that case. Or say we fail at the next line. We are successful at 'Started container che-devfile-registry' and we see the event in our list, but we did not have any more events in our list. We would not know that we next went off to pull image "quay.io/eclipse/che-plugin-registry:nightly". But this would be different (and improved) if we first announced "About to pull image "quay.io/eclipse/che-plugin-registry:nightly". Then if we failed in this action, we would at least know what we were trying to do when things went badly. It is only semi-helpful to announce success when we arrive from some task. To help diagnose problems, it is much more helpful to first announce the intention, then announce completion when we are successful. (And if we are not, log the exception that prevented successful completion.) I know we cannot get this from k8s events, they are not set up this way. We will need logs. But I am glad we are having the conversation, so people can think about it. Thanks for considering. |
Why not provide your own implementation of OutputStream that writes to a buffer and pokes a single reader thread to process the output? As I understand it, the blocking nature is only of concern because you want to reduce the number threads, right? |
fixed by #16126 |
Is your enhancement related to a problem? Please describe.
In case of workspace startup failure, it's very hard for the user to get the logs from the workspace. We should improve this experience, so users have better idea what happened and can write us better bug reports with workspace logs.
Describe the solution you'd like
Introduce some workspace startup flag that will enable debug mode. In case it's enabled, watch all logs from the workspace pod during the startup. Send these logs to the dashboard workspace startup screen, so user will see what's happening and in case of failure can copy the logs. Once workspace successfully starts or fails to start, stop watching.
Observer here will be che-server.
Risks
TODO:
Describe alternatives you've considered
--
Additional context
epic - #15047
The text was updated successfully, but these errors were encountered: