Hi,
I can run task with success in a Docker container in my mesos install
using base executor.
However, I cannot get a task running when I add port mapping (though
port is available).
I use mesos 0.22, with python 2.7.
If I print the sent task I have:
name: "task 0"
task_id {
value: "0"
}
slave_id {
value: "20150526-114150-16777343-5050-2035-S0"
}
resources {
name: "cpus"
type: SCALAR
scalar {
value: 1
}
}
resources {
name: "mem"
type: SCALAR
scalar {
value: 128
}
}
command {
value: "echo \"hello world # $MESOS_SANDBOX #\""
}
container {
type: DOCKER
docker {
image: "centos"
network: BRIDGE
port_mappings {
host_port: 31000
container_port: 22
}
force_pull_image: true
}
}
And it ends with error:
Task 0 is in state TASK_FAILED
Abnormal executor termination
Slave shows:
I0529 13:50:49.813928 18426 docker.cpp:626] Starting container
'd9b5be3e-9f00-4242-aa91-d6a6f3a5175a' for task '0' (and executor '0')
of framework '20150529-103634-16777343-5050-18179-0020'
E0529 13:50:54.362663 18420 slave.cpp:3112] Container
'd9b5be3e-9f00-4242-aa91-d6a6f3a5175a' for executor '0' of framework
'20150529-103634-16777343-5050-18179-0020' failed to start: Port
mappings require port resources
However the offer present port resources:
resources {
name: "ports"
type: RANGES
ranges {
range {
begin: 31000
end: 32000
}
}
role: "*"
}
At slave startup I also see:
I0529 14:05:37.481212 22455 slave.cpp:322] Slave resources: cpus(*):8;
mem(*):6900; disk(*):215925; ports(*):[31000-32000]
Any idea of what is going wrong?
Thanks
Olivier
--
gpg key id: 4096R/326D8438 (keyring.debian.org)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438