mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avinash sridharan <avin...@mesosphere.io>
Subject Re: Review Request 46331: Fixed the issue that command executor can not join CNI network.
Date Mon, 18 Apr 2016 19:42:46 GMT

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




src/slave/containerizer/mesos/isolators/network/cni/cni.hpp (line 125)
<https://reviews.apache.org/r/46331/#comment192794>

    Why do we need this extra logic to determine if we should bind mount the files to the
corresponding files in the host file system or not? If we do it for all cases there is going
to no harm since no process in the new network namespace should be seeing the original network
files from the host file system.



src/slave/containerizer/mesos/isolators/network/cni/cni.cpp (lines 1434 - 1448)
<https://reviews.apache.org/r/46331/#comment192795>

    I think we should bind mount the source to the corresponding files in the host file system
irrespective of whether it is a command task or not. Since the executor is guaranteed to run
in the new network namespace. This would imply that the executor would always need these files.


- Avinash sridharan


On April 18, 2016, 1:41 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46331/
> -----------------------------------------------------------
> 
> (Updated April 18, 2016, 1:41 p.m.)
> 
> 
> Review request for mesos, Avinash sridharan and Jie Yu.
> 
> 
> Bugs: MESOS-5225
>     https://issues.apache.org/jira/browse/MESOS-5225
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed the issue that command executor can not join CNI network.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/network/cni/cni.hpp a06bb89a7a79a62949a48274df806f9f95da09e7

>   src/slave/containerizer/mesos/isolators/network/cni/cni.cpp 6e3fe118fb63d1ce7d5b01a6ac32f8f3a1369cfb

> 
> Diff: https://reviews.apache.org/r/46331/diff/
> 
> 
> Testing
> -------
> 
> 1. Start master
> sudo ./bin/mesos-master.sh --work_dir=/tmp
> 
> 2. Start agent
> sudo ./bin/mesos-slave.sh --master=192.168.122.171:5050 --containerizers=mesos --image_providers=docker
--isolation=filesystem/linux,docker/runtime,network/cni --network_cni_config_dir=/opt/cni/net_configs
--network_cni_plugins_dir=/opt/cni/plugins
> 
> 3. Launch a command task with mesos-execute, and it will join a CNI network net1.
> sudo src/mesos-execute --master=192.168.122.171:5050 --name=test --docker_image=library/busybox
--networks=net1 --command="sleep 10" --shell=true
> I0418 21:34:57.248507 24604 scheduler.cpp:177] Version: 0.29.0
> Subscribed with ID 'c992158d-e625-4359-97fe-6320172fd957-0016'
> Submitted task 'test' to agent 'eeb0be14-77cb-462d-b088-657745453c83-S0'
> Received status update TASK_RUNNING for task 'test'
>   source: SOURCE_EXECUTOR
> Received status update TASK_FINISHED for task 'test'
>   message: 'Command exited with status 0'
>   source: SOURCE_EXECUTOR
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message