-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46329/
-----------------------------------------------------------
Review request for mesos, Avinash sridharan and Jie Yu.
Bugs: MESOS-5226
https://issues.apache.org/jira/browse/MESOS-5226
Repository: mesos
Description
-------
Made imageless task launched by 'mesos-execute' can join CNI network.
Diffs
-----
src/cli/execute.cpp f70d9e1c4badb7d4342e90ce4d4f8114f27a7dff
Diff: https://reviews.apache.org/r/46329/diff/
Testing
-------
Run mesos-execute to launch a command task which has no image but wants to join
a CNI network `net1`:
```
$ sudo src/mesos-execute --master=192.168.122.171:5050 --name=test
--networks=net1 --command="ifconfig" --shell=true
```
Check the output of the command:
```
$ cat
/tmp/mesos/slaves/eeb0be14-77cb-462d-b088-657745453c83-S0/frameworks/c992158d-e625-4359-97fe-6320172fd957-0017/executors/test/runs/4be791cd-663f-4395-b125-71ae2f03d495/stdout
Registered executor on mesos
Starting task test
Forked command at 24881
sh -c 'ifconfig'
eth0 Link encap:Ethernet HWaddr da:7f:c0:39:93:b9
inet addr:192.168.1.2 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::d87f:c0ff:fe39:93b9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13 errors:0 dropped:0 overruns:0 frame:0
TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2222 (2.2 KB) TX bytes:1186 (1.1 KB)
Command exited with status 0 (pid: 24881)
Shutting down
Sending SIGTERM to process tree at pid 24881
Sent SIGTERM to the following process trees:
[
]
```
So it successfully joined the CNI network with IP `192.168.1.2` assigned.
Thanks,
Qian Zhang