-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/55191/#review162058
-----------------------------------------------------------




src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (lines 93 - 94)
<https://reviews.apache.org/r/55191/#comment233303>

    we don't indent like this.



src/tests/containerizer/cni_isolator_tests.cpp (line 288)
<https://reviews.apache.org/r/55191/#comment233312>

    I don't like the idea of piggybacking on this test. I'll probably create a 
new one.


- Jie Yu


On Jan. 18, 2017, 12:54 a.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55191/
> -----------------------------------------------------------
> 
> (Updated Jan. 18, 2017, 12:54 a.m.)
> 
> 
> 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 
> 4df69ab98244f2475e6b5330f374bb58159eca41 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 
> ea91c71fdfac48a2fc1d31a0ee088a73244be367 
>   src/tests/containerizer/cni_isolator_tests.cpp 
> 82697aea98add4adc2cf7eac5f30dd9b467803c9 
> 
> 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]#
> ```
> 
> CNI Tests (Fedora 25):
> ```
> [jpeach@jpeach build]$ sudo bin/mesos-tests.sh --gtest_filter=*Cni*
> ...
> [==========] Running 7 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 7 tests from CniIsolatorTest
> ...
> [----------] 7 tests from CniIsolatorTest (16490 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 7 tests from 1 test case ran. (16514 ms total)
> [  PASSED  ] 7 tests.
> ```
> 
> 
> Thanks,
> 
> James Peach
> 
>

Reply via email to