mesosphere-backup / deimos

Mesos containerizer hooks for Docker
Apache License 2.0
249 stars 26 forks source link

TypeError exception during launch #25

Closed jplock closed 10 years ago

jplock commented 10 years ago

I've seen this a few times when trying to launch a container from Marathon using deimos.

Jun 30 21:11:44 myserver deimos[8798]: deimos.cli() Unhandled failure in launch#012Traceback (most recent call last):#012  File "/usr/local/lib/python2.7/dist-packages/deimos/__init__.py", line 72, in cli#012    result = deimos.containerizer.stdio(containerizer, *argv[1:])#012  File "/usr/local/lib/python2.7/dist-packages/deimos/containerizer/__init__.py", line 97, in stdio#012    method(recordio.read(proto), *args[1:])#012  File "/usr/local/lib/python2.7/dist-packages/deimos/containerizer/docker.py", line 72, in launch#012    pre, image = re.split(r"^docker:///?", url)#012  File "/usr/lib/python2.7/re.py", line 167, in split#012    return _compile(pattern, flags).split(string, maxsplit)#012TypeError: expected string or buffer

When trying to use a request payload such as:

{
  "container": {
    "image": "docker:///jplock/breakerbox"
  },
  "id": "breakbox",
  "instances": "1",
  "cpus": ".5",
  "mem": "512",
  "uris": [ ],
  "cmd": ""
}

Can I use any docker image or do I have to use libmesos\ubuntu? That wasn't clear from the docs.

MikeMichel commented 10 years ago

works for me if you add "options": ["--privileged=false"]

Mike

jplock commented 10 years ago

Is that privileged option required? See #20

solidsnack commented 10 years ago

This and #20 seem to be the result of a serialization bug in Marathon -- if you don't pass an empty options field, an error results.