-
Notifications
You must be signed in to change notification settings - Fork 201
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
Make debugging of our containers easier #112
Comments
Something like this? |
I like the item 1, a bit more verbose but easier to understand the transitions between each part. PostgreSQL's log "server is shutting down" looks indeed confusing. From item 2 I'd pick only |
@praiskup I'm not 100% sure we want to use any kinds of levels, but maybe. @rhcarvalho now I'm thinking about doing |
something like |
@mnagy +1, this sounds like an excellent idea. |
@mnagy I like the idea, we need something for debugging. Instead of |
Also, a question. I don't like very much the name of the variable proposed, "CONT_DEBUG". I don't think I have any reasonable objective objections, I just don't like the sound of it. Anyone have any better ideas? Any reason why we should not use an application specific name, such as MYSQL_DEBUG? It would be inline with environment variables that we have now. |
The problem is that we're not debugging MySQL itself, but our image. I thought that "CONT_DEBUG" was short for "CONTAINER_DEBUG". Why don't we simply have those improvements as part of our images without introducing a new env var? IOW, combine @mnagy's idea 1+2 and have clear messages and debug mode always on. |
Some general name will allow us to share code of some bash functions if we have any. Also, output of Then secret data like passwords, that's something that shouldn't be seen in logs at all, but with |
Debug always on is ugly if we're going to be running ls - alZ, plus the You could make the same argument about defaulting build logging to verbose Why not just call the variable CONTAINER_DEBUG? Abbreviating it doesn't Ben Parees | OpenShift
|
If we are going to print any debugging informations, they have to be properly annotated and printed in a way that one can understand what he see. Each section should have extra echo message saying "[DEBUG] This is XYZ" Otherwise you will just get tons of messages and finding a bug there will be pain. But I like the idea |
Ping? I'm finding myself debugging MySQL right now and the debugging functionality would come in handy. Any taker for this issue? |
@mnagy i think you're in the best position to implement the feature. |
i'm nominating @mnagy as well :-) |
…nge attributes Closes sclorg#112, closes sclorg#123
Debugging our database images has been a bit of a pain for me, especially when I do not have access to the machine where the container in question is being run (think QE and cooperation through issues/bugzilla bugs). I often find myself in a need to craft a custom image with debugging statements which is often tedious and can waste a lot of time (especially if OpenShift does not use the image I want).
It's hard to make sense from the container logs. I don't know if something is being printed out by the entrypoint script, database initialization script, or the final exec'd binary. In case of either MySQL or PostgreSQL (don't remember which), the last line runs along the lines of "server is shutting down". This is from the pre-exec'd process and it doesn't indicate failure. For a user who does not know how the image works, this must be extremely confusing.
Proposed solutions:
set -x
. This will be helpful for us. We're just going to tell our users to set a variable and send us output from that. We should also check out the volumes. We often have to deal with permission-related bugs or user mistakes (nfs). Putting couple ofls -la
statements on volumes might provide useful information. As well as callingid
.@bparees @thesteve0 @rhcarvalho @hhorak @praiskup @eliskasl
The text was updated successfully, but these errors were encountered: