mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafael Capucho (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MESOS-3533) Unable to find and run URIs files
Date Mon, 28 Sep 2015 14:39:04 GMT
Rafael Capucho created MESOS-3533:
-------------------------------------

             Summary: Unable to find and run URIs files
                 Key: MESOS-3533
                 URL: https://issues.apache.org/jira/browse/MESOS-3533
             Project: Mesos
          Issue Type: Bug
          Components: fetcher, general
    Affects Versions: 0.25.0
         Environment: Linux li202-122 4.1.5-x86_64-linode61 #7 SMP Mon Aug 24 13:46:31 EDT
2015 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 14.04.1 LTS
Docker Version: 1.8.2
Docker API version: 1.20
Go version: go1.4.2
            Reporter: Rafael Capucho
            Priority: Blocker


Hello,

Deploying a docker container using marathon 0.11 with the following structure (just example,
I had tried some variations with same result):

{
  "id": "testando-flask",
  "cmd": "ls -l; pip install -r requeriments.txt; ls -l; python app.py",
  "cpus": 0.5,
  "mem": 20.0,
  "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"
  ]
}

curl -X POST http://173.255.192.XXX:8080/v2/apps -d @flask.json -H "Content-type: application/json"

The task are reaching mesos master properly but it failed. When I execute the same structure
without uris and with a simple "python -m SimpleHTTPServer" it works! The docker is created
and running.

Analyzing the sandbox on Mesos UI I can see that the files of URIs are download correctly,
the project and the requirements.txt in stdout I got: 

Archive:  /tmp/mesos/slaves/fe42c404-7266-462b-adf5-549311bfbf32-S37/frameworks/fe42c404-7266-462b-adf5-549311bfbf32-0000/executors/testando-flask.a5ef5aad-65de-11e5-8b11-0242ac1101eb/runs/28e2dbd9-fa10-4d96-baec-0c89868237ff/app.zip
  inflating: /tmp/mesos/slaves/fe42c404-7266-462b-adf5-549311bfbf32-S37/frameworks/fe42c404-7266-462b-adf5-549311bfbf32-0000/executors/testando-flask.a5ef5aad-65de-11e5-8b11-0242ac1101eb/runs/28e2dbd9-fa10-4d96-baec-0c89868237ff/app.py
 
 extracting: /tmp/mesos/slaves/fe42c404-7266-462b-adf5-549311bfbf32-S37/frameworks/fe42c404-7266-462b-adf5-549311bfbf32-0000/executors/testando-flask.a5ef5aad-65de-11e5-8b11-0242ac1101eb/runs/28e2dbd9-fa10-4d96-baec-0c89868237ff/requeriments.txt
 
--container="mesos-fe42c404-7266-462b-adf5-549311bfbf32-S37.28e2dbd9-fa10-4d96-baec-0c89868237ff"
--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/fe42c404-7266-462b-adf5-549311bfbf32-S37/frameworks/fe42c404-7266-462b-adf5-549311bfbf32-0000/executors/testando-flask.a5ef5aad-65de-11e5-8b11-0242ac1101eb/runs/28e2dbd9-fa10-4d96-baec-0c89868237ff"
--stop_timeout="0ns"
--container="mesos-fe42c404-7266-462b-adf5-549311bfbf32-S37.28e2dbd9-fa10-4d96-baec-0c89868237ff"
--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/fe42c404-7266-462b-adf5-549311bfbf32-S37/frameworks/fe42c404-7266-462b-adf5-549311bfbf32-0000/executors/testando-flask.a5ef5aad-65de-11e5-8b11-0242ac1101eb/runs/28e2dbd9-fa10-4d96-baec-0c89868237ff"
--stop_timeout="0ns"
Registered docker executor on li202-122.members.linode.com
Starting task testando-flask.a5ef5aad-65de-11e5-8b11-0242ac1101eb
Could not open requirements file: [Errno 2] No such file or directory: 'requeriments.txt'
Storing complete log in /root/.pip/pip.log
total 68
drwxr-xr-x   2 root root  4096 Jan 15  2015 bin
drwxr-xr-x   2 root root  4096 Apr 19  2012 boot
drwxr-xr-x  10 root root 13740 Sep 28 12:44 dev
drwxr-xr-x  46 root root  4096 Sep 28 12:44 etc
drwxr-xr-x   2 root root  4096 Apr 19  2012 home
drwxr-xr-x  11 root root  4096 Jan 15  2015 lib
drwxr-xr-x   2 root root  4096 Jan 15  2015 lib64
drwxr-xr-x   2 root root  4096 Jan 15  2015 media
drwxr-xr-x   3 root root  4096 Sep 28 12:44 mnt
drwxr-xr-x   2 root root  4096 Jan 15  2015 opt
dr-xr-xr-x 170 root root     0 Sep 28 12:44 proc
drwx------   3 root root  4096 Sep 28 12:44 root
drwxr-xr-x   5 root root  4096 Jan 15  2015 run
drwxr-xr-x   2 root root  4096 Jan 16  2015 sbin
drwxr-xr-x   2 root root  4096 Mar  5  2012 selinux
drwxr-xr-x   2 root root  4096 Jan 15  2015 srv
dr-xr-xr-x  13 root root     0 Sep 27 14:28 sys
drwxrwxrwt   2 root root  4096 Jan 24  2015 tmp
drwxr-xr-x  10 root root  4096 Jan 16  2015 usr
drwxr-xr-x  11 root root  4096 Jan 16  2015 var

So I can see the files in Sandbox UI but It dont appear in the fold.

My Mesos Master:
docker run -d --net="host" --restart="always" --name="mesos-master"  -p 5050:5050 -e "MESOS_HOSTNAME=${HOST_IP}"
-e "MESOS_IP=${HOST_IP}" -e "MESOS_ZK=zk://${HOST_IP}:2181/mesos" -e "MESOS_PORT=5050" -e
"MESOS_LOG_DIR=/var/log/mesos" -e "MESOS_QUORUM=1" -e "MESOS_REGISTRY=in_memory" -e "MESOS_WORK_DIR=/var/lib/mesos"
-e "MESOS_CLUSTER=ATLAS" rafa/docker-mesos-master mesos-master

My Mesos Slave:
docker run --privileged -d -p 31000-31300:31000-31300 \
--name="mesos_slave" \
--restart="always" \
--net="host" \
-v $(which docker):/bin/docker \
-v $(ldconfig -p | grep 'libdevmapper.so.1.02' | awk '{print $4}'):/usr/lib/libdevmapper.so.1.02
\
-v /sys:/sys \
-v /var/run/docker.sock:/var/run/docker.sock \
-e "MESOS_MASTER=zk://${HOST_IP}:2181/mesos" \
-e "MESOS_LOG_DIR=/var/log/mesos" \
-e "MESOS_CONTAINERIZERS=docker,mesos" \
-e "MESOS_LOGGING_LEVEL=INFO" \
rafa/docker-mesos-slave mesos-slave



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message