Re: Programmatically retrieve stdout/stderr from a node

2016-08-12 Thread Benjamin Mahler
Also I believe the CLI work that Haris / Kevin have been doing would make this easy to do via the Mesos CLI (it's not integrated into the project yet). On Wed, Aug 10, 2016 at 9:57 AM, Erik Weathers wrote: > Just for completeness and to provide an alternative, you can also probably > leverage th

Re: Programmatically retrieve stdout/stderr from a node

2016-08-10 Thread Erik Weathers
Just for completeness and to provide an alternative, you can also probably leverage the dcos command line tool (https://github.com/dcos/dcos-cli) to get all the info you would need in a JSON format. e.g., 1. set up ~/.dcos/config.toml for your cluster 2. DCOS_CONFIG=~/.dcos/config.toml dcos task -

Re: Programmatically retrieve stdout/stderr from a node

2016-08-10 Thread June Taylor
David, Thanks for the suggestions, this has the missing piece we needed! Thanks, June Taylor System Administrator, Minnesota Population Center University of Minnesota On Wed, Aug 10, 2016 at 10:54 AM, David Greenberg wrote: > The Cook framework has examples of how to do this. See here ( > htt

Re: Programmatically retrieve stdout/stderr from a node

2016-08-10 Thread David Greenberg
The Cook framework has examples of how to do this. See here ( https://github.com/twosigma/Cook/blob/master/scheduler/src/cook/mesos/api.clj#L322-L324) for constructing the stem of the URL, here ( https://github.com/twosigma/Cook/blob/7a49fbb98b281e3b23779cd88d1d2b73428a0447/scheduler/src/cook/mesos

Re: Programmatically retrieve stdout/stderr from a node

2016-08-10 Thread Tomek Janiszewski
Oh, now I got it. To get path you need to query agent for it's state with /slave(1)/state. In response you will get JSON. Path to sandbox is stored in .frameworks[].executors[].directory. śr., 10.08.2016 o 17:34 użytkownik June Taylor napisał: > Tomek, > > I'm not sure I understand your suggesti

Re: Programmatically retrieve stdout/stderr from a node

2016-08-10 Thread June Taylor
Tomek, I'm not sure I understand your suggestion. We know how to ask for a file from an HTTP endpoint, but it is the construction of the correct URL which is not currently clear. We are not sure how to determine the Run ID of the executor. Thanks, June Taylor System Administrator, Minnesota Pop

Re: Programmatically retrieve stdout/stderr from a node

2016-08-10 Thread Tomek Janiszewski
Hi If you need simplest method then python SimpleHTTPServer could help. Just launch it in background before command you want to run, assign it port and query sandbox with : that can be obtained from state endpoint. - Tomek śr., 10.08.2016 o 16:53 użytkownik June Taylor napisał: > We are trying

Programmatically retrieve stdout/stderr from a node

2016-08-10 Thread June Taylor
We are trying to retrieve the stdout and stderr files from an executor programmatically. It appears that these are available via HTTP request, however, constructing the correct URL is posing to be a challenge. Our scenario is: 1. Use mesos-execute to submit a job. A framework ID is available at