-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55191/
-----------------------------------------------------------
Review request for mesos, Avinash sridharan, Jie Yu, and Jiang Yan Xu.
Bugs: MESOS-6556
https://issues.apache.org/jira/browse/MESOS-6556
Repository: mesos
Description
-------
Since the task info contains a `hostname` field, allow schedulers to
use this to specify the hostname that is assigned to the container.
Diffs
-----
src/slave/containerizer/mesos/isolators/network/cni/cni.hpp
276b9003aa2671b9ca819e44fb1cd60ae9dff167
src/slave/containerizer/mesos/isolators/network/cni/cni.cpp
ea91c71fdfac48a2fc1d31a0ee088a73244be367
Diff: https://reviews.apache.org/r/55191/diff/
Testing
-------
make check (Fedora 25)
Manual testing:
```
[jpeach@jpeach mesos-config]$ /opt/mesos/bin/mesos-execute
--master=127.0.0.1:5050 --task=file://$(pwd)/sleep-task.json
...
[jpeach@jpeach mesos-config]$ cat sleep-task.json
{
"name": "sleep",
"agent_id": { "value": "any" },
"task_id": {
"value": "sleep-1"
},
"resources": [
{
"name": "cpus",
"type": "SCALAR",
"scalar": {
"value": 0.4
},
"role": "*"
},
{
"name": "mem",
"type": "SCALAR",
"scalar": {
"value": 32
},
"role": "*"
}
],
"command": {
"value": "ip link > link; ip addr > addr; ip route > route; sleep 1000",
"environment": {
" variables": [
{ "name": "GLOG_v", "value": "2" }
]
}
},
"container": {
"type": "MESOS",
"hostname": "sleep.jpeach.org",
"network_infos": {
"name": "cni-test"
},
"mesos": {
"image": {
"type": "DOCKER",
"docker": {
"name": "gala"
}
}
}
}
}
...
[root@jpeach jpeach]# nsenter -t 2934 -m -u -i -n -w -r
[root@sleep sandbox]# cat /etc/hostname
sleep.jpeach.org[root@sleep sandbox]# hostname
sleep.jpeach.org
[root@sleep sandbox]#
```
Thanks,
James Peach