Re: docker based executor

2015-04-19 Thread Tyson Norris
Ah, after reading some info at https://tnachen.wordpress.com/2014/08/19/docker-in-mesos-0-20/ I see that I should probably be setting my slave container to run with --net=host - with that it is working now. Are the changes for https://issues.apache.org/jira/browse/MESOS-2183 going to allow

Re: docker based executor

2015-04-18 Thread Tim Chen
Hi Tyson, The error message you saw in the logs about the executor exited actually just means the executor process has exited. Since you're launching a custom executor with MesosSupervisor, it seems like MesosSupervisor simply exited without reporting any task status. Can you look at what's the

Re: docker based executor

2015-04-18 Thread Tyson Norris
Hi Tim - Yes, I mentioned below when using a script like: -- #!/bin/bash until false; do echo waiting for something to do something sleep 0.2 done -- In my sandbox stdout I get exactly 2 lines: waiting for something to do

Re: docker based executor

2015-04-18 Thread Tim Chen
That does seems odd, how did you run this via mesos? Are you using your own framework or through another framework like Marathon? And what does the TaskInfo look like? Also note that if you're just testing a container, you don't want to set the ExecutorInfo with a command as Executors in Mesos

Re: docker based executor

2015-04-18 Thread Tyson Norris
Hi Tim - I am using my own framework - a modified version of mesos-storm, attempting to use docker containers instead of TaskInfo is like: TaskInfo task = TaskInfo.newBuilder() .setName(worker + slot.getNodeId() + : + slot.getPort())

Re: docker based executor

2015-04-18 Thread Tyson Norris
Hi Tim - Actually, rereading your email: For a test image like this you want to set the CommandInfo with a ContainerInfo holding the docker image instead.” it sounds like you are suggesting running the container as a task command? But part of what I’m doing is trying to provide a custom

Re: docker based executor

2015-04-18 Thread Tyson Norris
I think I may be running into this: https://issues.apache.org/jira/browse/MESOS-2183 I’m trying to get docker-compose to launch slave with --pid=host, but having a few separate problems with that. I will update this thread when I’m able to test that. Thanks Tyson On Apr 18, 2015, at 1:14 PM,

Re: docker based executor

2015-04-18 Thread Tim Chen
Hi Tyson, Glad you figured it out, sorry didn't realize you were running mesos slave in a docker (which surely complicates things). I have a series of patches that is pending to be merged that will also make recovering tasks when relaunching mesos-slave in a docker works. Currently even with

Re: docker based executor

2015-04-17 Thread Tyson Norris
Yes, agreed that the command should not exit - but the container is killed at around 0.5 s after launch regardless of whether the command terminates, which is why I’ve been experimenting using commands with varied exit times. For example, forget about the executor needing to register

Re: docker based executor

2015-04-17 Thread Jason Giedymin
What is the last command you have docker doing? If that command exits then the docker will begin to end the container. -Jason On Apr 17, 2015, at 3:23 PM, Tyson Norris tnor...@adobe.com wrote: Hi - I am looking at revving the mesos-storm framework to be dockerized (and simpler). I’m

Re: docker based executor

2015-04-17 Thread Jason Giedymin
Try: until something; do echo waiting for something to do something sleep 5 done You can put this in a bash file and run that. If you have a dockerfile would be easier to debug. -Jason On Apr 17, 2015, at 4:24 PM, Tyson Norris tnor...@adobe.com wrote: Yes, agreed that the command

Re: docker based executor

2015-04-17 Thread Tyson Norris
You can reproduce with most any dockerfile, I think - it seems like launching a customer executor that is a docker container has some problem. I just made a simple test with docker file: -- #this is oracle java8 atop phusion baseimage FROM

Re: docker based executor

2015-04-17 Thread Erik Weathers
hey Tyson, I've also worked a bit on improving simplifying the mesos-storm framework -- spent the recent Mesosphere hackathon working with tnachen of Mesosphere on this. Nothing deliverable quite yet. We didn't look at dockerization at all, the hacking we did was around these goals: * Avoiding

Re: docker based executor

2015-04-17 Thread Tyson Norris
mesos master INFO log says: I0418 04:26:31.573763 6 master.cpp:3755] Sending 1 offers to framework 20150411-165219-771756460-5050-1- (marathon) at scheduler-8b8d994e-5881-4687-81eb-5b3694c66342@172.17.1.34mailto:8b8d994e-5881-4687-81eb-5b3694c66342@172.17.1.34:44364 I0418 04:26:31.580003

Re: docker based executor

2015-04-17 Thread Tyson Norris
Hi Erik - Yes these sound like good changes - I am currently focused on just trying to strip things down to be simpler for building versions etc. Specifically I’ve been working on: - don’t distribute config via embedded http server, just send the settings via command args, e.g. -c

Re: docker based executor

2015-04-17 Thread Jason Giedymin
What do any/all logs say? (syslog) -Jason On Apr 17, 2015, at 7:22 PM, Tyson Norris tnor...@adobe.com wrote: another interesting fact: I can restart the docker container of my executor, and it runs great. In the test example below, notice the stdout appears to be growing as expected