mesos-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From haosdent <haosd...@gmail.com>
Subject Re: Unable to find and run URIs files
Date Tue, 29 Sep 2015 08:51:01 GMT
Let me describe how I run your image here, hope this help you find which
configuration is wrong in your side.

I use your flask.json but change the command.
```
{
    "id": "testando-flask",
    "cmd": "ls -l /mnt/mesos/sandbox && cd /mnt/mesos/sandbox && pip
install -r requeriments.txt && python app.py",
    "cpus": 0.5,
    "mem": 20,
    "container": {
        "type": "DOCKER",
        "docker": {
            "image": "therealwardo/python-2.7-pip",
            "network": "BRIDGE",
            "privileged": true,
            "portMappings": [
                {
                    "containerPort": 31177,
                    "hostPort": 0
                }
            ]
        }
    },
    "uris": [
        "http://blog.rafaelcapucho.com/app.zip"
    ]
}
```

And after I launch this task in marathon, the stdout of executor looks like:

```
--container="mesos-033e1ec2-21f2-4fb3-99d1-3460d4c80bca-S0.76cd816e-2b3f-47b5-88a3-cff7c791e115"
--docker="docker" --docker_socket="/var/run/docker.sock" --help="false"
--initialize_driver_logging="true" --logbufsecs="0" --logging_level="INFO"
--mapped_directory="/mnt/mesos/sandbox" --quiet="false"
--sandbox_directory="/tmp/mesos/slaves/033e1ec2-21f2-4fb3-99d1-3460d4c80bca-S0/frameworks/033e1ec2-21f2-4fb3-99d1-3460d4c80bca-0001/executors/testando-flask.81c38a22-6684-11e5-b030-0242c8996eac/runs/76cd816e-2b3f-47b5-88a3-cff7c791e115"
--stop_timeout="0ns"
Registered docker executor on xxxxxxxxx
Starting task testando-flask.81c38a22-6684-11e5-b030-0242c8996eac
total 24
-rw-r--r-- 1 15840 60149  170 Sep 27 03:11 app.py
-rw-r--r-- 1 15840 60149  461 Sep 29 08:31 app.zip
-rw-r--r-- 1 15840 60149    6 Sep 27 03:06 requeriments.txt
-rw-r--r-- 1 15840 60149 4865 Sep 29 08:31 stderr
-rw-r--r-- 1 15840 60149 1949 Sep 29 08:31 stdout
Downloading/unpacking Flask (from -r requeriments.txt (line 1))
  Running setup.py egg_info for package Flask
```

As you could see above, "/mnt/mesos/sandbox" should would mount from the
origin sandbox "/tmp/mesos/slaves/xxxx". And make sure it works outside
from docker.

```
$ curl http://localhost:31302/ && echo "Success"
Hello World!Success
```

And if you "export GLOG_v=1" in slave, you should also could found the
docker running command in executor stderr, looks like this

```
 I0929 16:31:41.080276 14123 docker.cpp:564] Running docker -H
unix:///var/run/docker.sock run --privileged -c 512 -m 33554432 -e
MARATHON_APP_VERSION=2015-09-29T08:31:40.137Z -e HOST=mesos.xxxxx.com -e
PORT_31177=31302 -e MARATHON_APP_DOCKER_IMAGE=therealwardo/python-2.7-pip
-e MESOS_TASK_ID=testando-flask.81c38a22-6684-11e5-b030-0242c8996eac -e
PORT=31302 -e PORTS=31302 -e MARATHON_APP_ID=/testando-flask -e PORT0=31302
-e MESOS_SANDBOX=/mnt/mesos/sandbox -e
MESOS_CONTAINER_NAME=mesos-033e1ec2-21f2-4fb3-99d1-3460d4c80bca-S0.76cd816e-2b3f-47b5-88a3-cff7c791e115
-v
/tmp/mesos/slaves/033e1ec2-21f2-4fb3-99d1-3460d4c80bca-S0/frameworks/033e1ec2-21f2-4fb3-99d1-3460d4c80bca-0001/executors/testando-flask.81c38a22-6684-11e5-b030-0242c8996eac/runs/76cd816e-2b3f-47b5-88a3-cff7c791e115:/mnt/mesos/sandbox
--net bridge -p 31302:31177/tcp --entrypoint /bin/sh --name
mesos-033e1ec2-21f2-4fb3-99d1-3460d4c80bca-S0.76cd816e-2b3f-47b5-88a3-cff7c791e115
therealwardo/python-2.7-pip -c ls -l /mnt/mesos/sandbox && cd
/mnt/mesos/sandbox && pip install -r requeriments.txt && python app.py
```

And for the warning log you paste in jira,
```
W0928 20:54:24.810431 13 slave.cpp:4452] Failed to get resource statistics
for executor 'novo-teste.c0442998-661f-11e5-8b11-0242ac1101eb' of framework
fe42c404-7266-462b-adf5-549311bfbf32-0000: Failed to collect cgroup stats:
Failed to determine cgroup for the 'cpu' subsystem: Failed to read
/proc/27138/cgroup: Failed to open file '/proc/27138/cgroup': No such file
or directory
```
I think it should not cause your problem. I think maybe because your
work_dir is /tmp but you not map it when you start slave using docker.

On Tue, Sep 29, 2015 at 3:33 PM, haosdent <haosdent@gmail.com> wrote:

> Hi, @Rafael Today I test with Ubuntu 14.04/docker 1.8.2/marathon
> 0.11.0-RC5 again. Docker sandbox mount works for me. I still not ideas why
> your task could not got the unzip files correct. I would test with your
> image therealwardo/python-2.7-pip and
> http://blog.rafaelcapucho.com/app.zip now and give you feedback later.
>
> On Tue, Sep 29, 2015 at 3:25 PM, tommy xiao <xiaods@gmail.com> wrote:
>
>> alternative you can start a cluster in aws from mesosphere, then you can
>> do your testing.
>>
>> 2015-09-29 11:21 GMT+08:00 Rafael Capucho <rafael.capucho@gmail.com>:
>>
>>> Hello!,
>>>
>>> Firstly, sorry for paste a link instead of rewrite the problem, but in
>>> the following page there are comments that could help,
>>>
>>> https://issues.apache.org/jira/browse/MESOS-3533?filter=-2
>>>
>>> Can anyone help me? Thank you.
>>>
>>>
>>>
>>> --
>>> Rafael Capucho
>>>
>>> Bachelor of Computer Science
>>> Federal University of São Paulo
>>> Institute of Science and Technology - ICT
>>>
>>> PGP-Public Key: 2048R/7389A96F pgp.mit.edu
>>> FP: EDB5 CDEE 8442 99CC C92D 9173 6B32 A5C9 7389 A96F
>>>
>>
>>
>>
>> --
>> Deshi Xiao
>> Twitter: xds2000
>> E-mail: xiaods(AT)gmail.com
>>
>
>
>
> --
> Best Regards,
> Haosdent Huang
>



-- 
Best Regards,
Haosdent Huang

Mime
View raw message