You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Avinash sridharan <av...@mesosphere.io> on 2016/04/06 06:14:19 UTC
Review Request 45801: Reset the `LIBPROCESS_IP` environment variable
in `network/cni`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45801/
-----------------------------------------------------------
Review request for mesos, Jie Yu and Qian Zhang.
Bugs: MESOS-5127
https://issues.apache.org/jira/browse/MESOS-5127
Repository: mesos
Description
-------
Currently the `LIBPROCESS_IP` environment variable was being set to
the Agent IP if the environment variable has not be defined by the
`Framework`. For containers having their own IP address (as with
containers on CNI networks) this becomes a problem since the command
executor tries to bind to the `LIBPROCESS_IP` that does not exist in
its network namespace, and fails. Thus, for containers launched on CNI
networks the `LIBPROCESS_IP` should not be set, or rather is set to
"0.0.0.0", allowing the container to bind to the IP address provided
by the CNI network.
Diffs
-----
src/slave/containerizer/mesos/isolators/network/cni/cni.cpp f43ab071de42de16d330cfd2a3b76563bcb173c9
Diff: https://reviews.apache.org/r/45801/diff/
Testing
-------
Started a slave with the following flags:
Flags at startup: --appc_simple_discovery_uri_prefix="http://" --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http="false" --authenticatee="crammd5" --cgroups_cpu_enable_pids_and_tids_count="false" --cgroups_enable_cfs="false" --cgroups_hierarchy="/sys/fs/cgroup" --cgroups_limit_swap="false" --cgroups_root="mesos" --container_disk_watch_interval="15secs" --containerizers="mesos" --default_role="*" --disk_watch_interval="1mins" --docker="docker" --docker_kill_orphans="true" --docker_registry="/home/vagrant/docker/builds/" --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" --enforce_container_disk_quota="false" --executor_environment_variables="{"LIBPROCESS_IP":"0.0.0.0"}" --executor_registration_timeout="1mins" --executor_shutdown_grace_period="5secs" --fetcher_cache_dir="/tmp/mesos/fetch" --fetcher_cache_size="2GB" --frameworks_home="" --gc_delay="1weeks" --gc_disk_headroom="0.1" -he -h
adoop_home="" --help="false" --hostname_lookup="true" --http_authenticators="basic" --image_providers="docker" --image_provisioner_backend="copy" --initialize_driver_logging="true" --ip="172.28.128.7" --isolation="filesystem/linux,docker/runtime,network/cni" --launcher_dir="/home/vagrant/mesosphere/mesos/build/src" --logbufsecs="0" --logging_level="INFO" --master="172.28.128.7:5050" --network_cni_config_dir="/home/vagrant/cni/config" --network_cni_plugins_dir="/home/vagrant/dev/go/cni/bin" --oversubscribed_resources_interval="15secs" --perf_duration="10secs" --perf_interval="1mins" --port="5051" --qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" --recovery_timeout="15mins" --registration_backoff_factor="1secs" --revocable_cpu_low_priority="true" --sandbox_directory="/mnt/mesos/sandbox" --strict="true" --switch_user="true" --systemd_enable_support="true" --systemd_runtime_directory="/run/systemd/system" --version="false" --work_dir="/home/vagrant/mesos_data_sla
ve/"
Ran `mesos-execute` with a docker-image and with a CNI network specified. The docker image was a Ubuntu 14.04 image, and the command specified was "ifconfig". Ensured that the container was launched succesfully and the task FINISHED succesfully, with the correct IP address.
Thanks,
Avinash sridharan
Re: Review Request 45801: Reset the `LIBPROCESS_IP` environment
variable in `network/cni`.
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45801/#review127301
-----------------------------------------------------------
Patch looks great!
Reviews applied: [45801]
Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh
- Mesos ReviewBot
On April 6, 2016, 4:14 a.m., Avinash sridharan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45801/
> -----------------------------------------------------------
>
> (Updated April 6, 2016, 4:14 a.m.)
>
>
> Review request for mesos, Jie Yu and Qian Zhang.
>
>
> Bugs: MESOS-5127
> https://issues.apache.org/jira/browse/MESOS-5127
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Currently the `LIBPROCESS_IP` environment variable was being set to
> the Agent IP if the environment variable has not be defined by the
> `Framework`. For containers having their own IP address (as with
> containers on CNI networks) this becomes a problem since the command
> executor tries to bind to the `LIBPROCESS_IP` that does not exist in
> its network namespace, and fails. Thus, for containers launched on CNI
> networks the `LIBPROCESS_IP` should not be set, or rather is set to
> "0.0.0.0", allowing the container to bind to the IP address provided
> by the CNI network.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp f43ab071de42de16d330cfd2a3b76563bcb173c9
>
> Diff: https://reviews.apache.org/r/45801/diff/
>
>
> Testing
> -------
>
> Started a slave with the following flags:
> Flags at startup: --appc_simple_discovery_uri_prefix="http://" --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http="false" --authenticatee="crammd5" --cgroups_cpu_enable_pids_and_tids_count="false" --cgroups_enable_cfs="false" --cgroups_hierarchy="/sys/fs/cgroup" --cgroups_limit_swap="false" --cgroups_root="mesos" --container_disk_watch_interval="15secs" --containerizers="mesos" --default_role="*" --disk_watch_interval="1mins" --docker="docker" --docker_kill_orphans="true" --docker_registry="/home/vagrant/docker/builds/" --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" --enforce_container_disk_quota="false" --executor_environment_variables="{"LIBPROCESS_IP":"0.0.0.0"}" --executor_registration_timeout="1mins" --executor_shutdown_grace_period="5secs" --fetcher_cache_dir="/tmp/mesos/fetch" --fetcher_cache_size="2GB" --frameworks_home="" --gc_delay="1weeks" --gc_disk_headroom="0.1" -he
-hadoop_home="" --help="false" --hostname_lookup="true" --http_authenticators="basic" --image_providers="docker" --image_provisioner_backend="copy" --initialize_driver_logging="true" --ip="172.28.128.7" --isolation="filesystem/linux,docker/runtime,network/cni" --launcher_dir="/home/vagrant/mesosphere/mesos/build/src" --logbufsecs="0" --logging_level="INFO" --master="172.28.128.7:5050" --network_cni_config_dir="/home/vagrant/cni/config" --network_cni_plugins_dir="/home/vagrant/dev/go/cni/bin" --oversubscribed_resources_interval="15secs" --perf_duration="10secs" --perf_interval="1mins" --port="5051" --qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" --recovery_timeout="15mins" --registration_backoff_factor="1secs" --revocable_cpu_low_priority="true" --sandbox_directory="/mnt/mesos/sandbox" --strict="true" --switch_user="true" --systemd_enable_support="true" --systemd_runtime_directory="/run/systemd/system" --version="false" --work_dir="/home/vagrant/mesos_data_s
lave/"
>
> Ran `mesos-execute` with a docker-image and with a CNI network specified. The docker image was a Ubuntu 14.04 image, and the command specified was "ifconfig". Ensured that the container was launched succesfully and the task FINISHED succesfully, with the correct IP address.
>
>
> Thanks,
>
> Avinash sridharan
>
>
Re: Review Request 45801: Reset the `LIBPROCESS_IP` environment
variable in `network/cni`.
Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45801/#review127406
-----------------------------------------------------------
Ship it!
Ship It!
- Jie Yu
On April 6, 2016, 4:14 a.m., Avinash sridharan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45801/
> -----------------------------------------------------------
>
> (Updated April 6, 2016, 4:14 a.m.)
>
>
> Review request for mesos, Jie Yu and Qian Zhang.
>
>
> Bugs: MESOS-5127
> https://issues.apache.org/jira/browse/MESOS-5127
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Currently the `LIBPROCESS_IP` environment variable was being set to
> the Agent IP if the environment variable has not be defined by the
> `Framework`. For containers having their own IP address (as with
> containers on CNI networks) this becomes a problem since the command
> executor tries to bind to the `LIBPROCESS_IP` that does not exist in
> its network namespace, and fails. Thus, for containers launched on CNI
> networks the `LIBPROCESS_IP` should not be set, or rather is set to
> "0.0.0.0", allowing the container to bind to the IP address provided
> by the CNI network.
>
>
> Diffs
> -----
>
> src/slave/containerizer/mesos/isolators/network/cni/cni.cpp f43ab071de42de16d330cfd2a3b76563bcb173c9
>
> Diff: https://reviews.apache.org/r/45801/diff/
>
>
> Testing
> -------
>
> Started a slave with the following flags:
> Flags at startup: --appc_simple_discovery_uri_prefix="http://" --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http="false" --authenticatee="crammd5" --cgroups_cpu_enable_pids_and_tids_count="false" --cgroups_enable_cfs="false" --cgroups_hierarchy="/sys/fs/cgroup" --cgroups_limit_swap="false" --cgroups_root="mesos" --container_disk_watch_interval="15secs" --containerizers="mesos" --default_role="*" --disk_watch_interval="1mins" --docker="docker" --docker_kill_orphans="true" --docker_registry="/home/vagrant/docker/builds/" --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" --enforce_container_disk_quota="false" --executor_environment_variables="{"LIBPROCESS_IP":"0.0.0.0"}" --executor_registration_timeout="1mins" --executor_shutdown_grace_period="5secs" --fetcher_cache_dir="/tmp/mesos/fetch" --fetcher_cache_size="2GB" --frameworks_home="" --gc_delay="1weeks" --gc_disk_headroom="0.1" -he
-hadoop_home="" --help="false" --hostname_lookup="true" --http_authenticators="basic" --image_providers="docker" --image_provisioner_backend="copy" --initialize_driver_logging="true" --ip="172.28.128.7" --isolation="filesystem/linux,docker/runtime,network/cni" --launcher_dir="/home/vagrant/mesosphere/mesos/build/src" --logbufsecs="0" --logging_level="INFO" --master="172.28.128.7:5050" --network_cni_config_dir="/home/vagrant/cni/config" --network_cni_plugins_dir="/home/vagrant/dev/go/cni/bin" --oversubscribed_resources_interval="15secs" --perf_duration="10secs" --perf_interval="1mins" --port="5051" --qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" --recovery_timeout="15mins" --registration_backoff_factor="1secs" --revocable_cpu_low_priority="true" --sandbox_directory="/mnt/mesos/sandbox" --strict="true" --switch_user="true" --systemd_enable_support="true" --systemd_runtime_directory="/run/systemd/system" --version="false" --work_dir="/home/vagrant/mesos_data_s
lave/"
>
> Ran `mesos-execute` with a docker-image and with a CNI network specified. The docker image was a Ubuntu 14.04 image, and the command specified was "ifconfig". Ensured that the container was launched succesfully and the task FINISHED succesfully, with the correct IP address.
>
>
> Thanks,
>
> Avinash sridharan
>
>