-
Notifications
You must be signed in to change notification settings - Fork 66
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
logviewer support for configurable storm.log.dir #118
Conversation
…rdcoded mesos-sandbox path
@dsKarthick @JessicaLHartog @DarinJ : please review at your convenience |
@@ -96,7 +102,7 @@ protected ProcessBuilder createProcessBuilder() { | |||
Paths.get(System.getProperty("user.dir"), "/bin/storm").toString(), | |||
"logviewer", | |||
"-c", | |||
"storm.log.dir=" + System.getenv("MESOS_SANDBOX") + "/logs", | |||
"storm.log.dir=" + logdir, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erikdw MESOS_SANDBOX is set by Mesos correct? Wondering if we should override System.getenv("MESOS_SANDBOX")
with logdir only if storm.log.dir
is configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I spoke too soon. I see that you have done exactly what I wanted in the LogViewerController function above :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup yup! ;)
@DarinJ & @dsKarthick : thank you for the review, I just pushed a change that addresses your comments. NOTE: I also noticed some setting of
For now I'm going to ignore this, but it probably needs to be readdressed later. |
So I said I'm going to ignore the Docker command line references, but now I'm thinking that I'll handle it by changing the NOTE: as an aside, I wonder why the docker command lines have log.dir set explicitly like this, but the non-docker ones do not. |
And that latest plan is hitting a roadblock: |
Looked a bit at the docker-shim code. I think the goal was to keep the logs from being written to the container itself. This has a few advantages. One it keeps the container size from growing, I've seen that fill /var/lib/docker when logs are written in the container. Two it keeps people from having to exec in to look at logs, this approach lets them simply look at the sandbox. I think this might be desired behavior in all real cases. I'll look at the shim though to see what changes we could make to allow the majority of the code be visible from the shims. Likely this will involve refactoring anything not calling the shims to a common sub-project. Another possibility is to replace LocalState with a Map of some type and go back to one build. I think it'd be easy enough to adjust the command lines once at run-time. |
…to Docker usage too
So: I propose for now that I put this logviewer fix on the backburner, and I'll try to do the refactor proposed here. Probably won't start on it until late tomorrow or maybe Tuesday, since I need to put work in on #117 and #120, so please let me know if you have any concerns with the proposal. Thanks! |
@erikdw sounds fine, if you want me to look at anything let me know. A bit swamped right now, but should be able to look things over and provide comments. |
@DarinJ : great, I'm also swamped (as always 😉 ), but I'll "at" you on the PR when I send it for a cursory review. |
d18d8b9
to
e851f17
Compare
Sooo.... I'm planning to just close this without fixing it. Reasoning:
|
but fall back to hardcoded mesos-sandbox path.
Notably,
storm.log.dir
is the configuration parameter in storm for choosing the log directory to be used (it's set in the logback (storm-0.9.x) & log4j 2 (storm-0.10.0+) config files).