Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-15 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [52856, 52787]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; 
./support/docker_build.sh

- Mesos ReviewBot


On Oct. 14, 2016, 4:26 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 14, 2016, 4:26 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
>   src/local/local.cpp 257179443827ffdfc946ed655a6840fcea70d454 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> ```
> $ sudo make install
> $ mesos-local
> ...
> I1014 12:23:47.563256 4284416 slave.cpp:208] Mesos agent started on 
> (1)@127.0.0.1:5050
> I1014 12:23:47.563302 4284416 slave.cpp:209] Flags at startup: 
> --appc_simple_discovery_uri_prefix="http://; 
> --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http_readonly="false" 
> --authenticate_http_readwrite="false" --authenticatee="crammd5" 
> --authentication_backoff_factor="1secs" --authorizer="local" 
> --container_disk_watch_interval="15secs" --containerizers="mesos" 
> --default_role="*" --disk_watch_interval="1mins" --docker="docker" 
> --docker_kill_orphans="true" --docker_registry="https://registry-1.docker.io; 
> --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" 
> --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" 
> --docker_volume_checkpoint_dir="/var/run/mesos/isolators/docker/volume" 
> --enforce_container_disk_quota="false" 
> --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" --hadoop_
 home="" --help="false" --hostname_lookup="true" --http_authenticators="basic" 
--http_command_executor="false" --image_provisioner_backend="copy" 
--initialize_driver_logging="true" --isolation="posix/cpu,posix/mem" 
--launcher="posix" --launcher_dir="/usr/local/libexec/mesos" --logbufsecs="0" 
--logging_level="INFO" --max_completed_executors_per_framework="150" 
--oversubscribed_resources_interval="15secs" 
--qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" 
--recovery_timeout="15mins" --registration_backoff_factor="1secs" 
--runtime_dir="/tmp/mesos/local/0" --sandbox_directory="/mnt/mesos/sandbox" 
--strict="true" --switch_user="true" --version="false" 
--work_dir="/tmp/mesos/local/0"
> ...
> 
> $ mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 12:25:39.922174 3211264 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 

Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-14 Thread Kevin Klues

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



This will no longer be necessary after https://reviews.apache.org/r/52902 lands.

- Kevin Klues


On Oct. 14, 2016, 4:26 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 14, 2016, 4:26 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
>   src/local/local.cpp 257179443827ffdfc946ed655a6840fcea70d454 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> ```
> $ sudo make install
> $ mesos-local
> ...
> I1014 12:23:47.563256 4284416 slave.cpp:208] Mesos agent started on 
> (1)@127.0.0.1:5050
> I1014 12:23:47.563302 4284416 slave.cpp:209] Flags at startup: 
> --appc_simple_discovery_uri_prefix="http://; 
> --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http_readonly="false" 
> --authenticate_http_readwrite="false" --authenticatee="crammd5" 
> --authentication_backoff_factor="1secs" --authorizer="local" 
> --container_disk_watch_interval="15secs" --containerizers="mesos" 
> --default_role="*" --disk_watch_interval="1mins" --docker="docker" 
> --docker_kill_orphans="true" --docker_registry="https://registry-1.docker.io; 
> --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" 
> --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" 
> --docker_volume_checkpoint_dir="/var/run/mesos/isolators/docker/volume" 
> --enforce_container_disk_quota="false" 
> --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" --hadoop_
 home="" --help="false" --hostname_lookup="true" --http_authenticators="basic" 
--http_command_executor="false" --image_provisioner_backend="copy" 
--initialize_driver_logging="true" --isolation="posix/cpu,posix/mem" 
--launcher="posix" --launcher_dir="/usr/local/libexec/mesos" --logbufsecs="0" 
--logging_level="INFO" --max_completed_executors_per_framework="150" 
--oversubscribed_resources_interval="15secs" 
--qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" 
--recovery_timeout="15mins" --registration_backoff_factor="1secs" 
--runtime_dir="/tmp/mesos/local/0" --sandbox_directory="/mnt/mesos/sandbox" 
--strict="true" --switch_user="true" --version="false" 
--work_dir="/tmp/mesos/local/0"
> ...
> 
> $ mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 12:25:39.922174 3211264 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 12:25:39.922353 3211264 

Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-14 Thread haosdent huang


> On Oct. 14, 2016, 5:48 p.m., Kevin Klues wrote:
> > This still doesn't have the right semantics:
> > ```
> > [klueska@core-dev build]$ ./bin/mesos-local.sh
> > I1014 10:43:56.385072 39941 master.cpp:382] Flags at startup: ... 
> > --runtime_dir="/tmp/mesos/0" ... --work_dir="/tmp/mesos/0"
> > ```
> > 
> > The `--runtime_dir` and `--work_dir` should have different values.
> > 
> > Also:
> > ```
> > [klueska@core-dev build]$ MESOS_RUNTIME_DIR=/tmp/kevin ./bin/mesos-local.sh
> > I1014 10:43:56.385072 39941 master.cpp:382] Flags at startup: ... 
> > --runtime_dir="/tmp/mesos/0" ... --work_dir="/tmp/mesos/0"
> > ```
> > 
> > I should be able to override the `--runtime_dir` with the environment 
> > variable.
> 
> Kevin Klues wrote:
> Changing `mesos-local-flags.in.sh` to have the following should address 
> both issues:
> 
> ```
> : ${MESOS_WORK_DIR:=/tmp/mesos/work_dir}
> : ${MESOS_RUNTIME_DIR:=/tmp/mesos/runtime_dir}
> 
> export MESOS_WORK_DIR
> export MESOS_RUNTIME_DIR
> ```
> 
> haosdent huang wrote:
> yep, now use `.sh` would have this problem. Use `src/mesos-local` would 
> be fine.

>The --runtime_dir and --work_dir should have different values.

Put both of them under the same folder `/tmp/mesos/0` should be safe? Because I 
saw their folders are not conflict.


- haosdent


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


On Oct. 14, 2016, 4:26 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 14, 2016, 4:26 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
>   src/local/local.cpp 257179443827ffdfc946ed655a6840fcea70d454 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> ```
> $ sudo make install
> $ mesos-local
> ...
> I1014 12:23:47.563256 4284416 slave.cpp:208] Mesos agent started on 
> (1)@127.0.0.1:5050
> I1014 12:23:47.563302 4284416 slave.cpp:209] Flags at startup: 
> --appc_simple_discovery_uri_prefix="http://; 
> --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http_readonly="false" 
> --authenticate_http_readwrite="false" --authenticatee="crammd5" 
> --authentication_backoff_factor="1secs" --authorizer="local" 
> --container_disk_watch_interval="15secs" --containerizers="mesos" 
> --default_role="*" --disk_watch_interval="1mins" --docker="docker" 
> --docker_kill_orphans="true" --docker_registry="https://registry-1.docker.io; 
> --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" 
> --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" 
> --docker_volume_checkpoint_dir="/var/run/mesos/isolators/docker/volume" 
> --enforce_container_disk_quota="false" 
> --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" --hadoop_
 home="" 

Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-14 Thread haosdent huang


> On Oct. 14, 2016, 5:48 p.m., Kevin Klues wrote:
> > This still doesn't have the right semantics:
> > ```
> > [klueska@core-dev build]$ ./bin/mesos-local.sh
> > I1014 10:43:56.385072 39941 master.cpp:382] Flags at startup: ... 
> > --runtime_dir="/tmp/mesos/0" ... --work_dir="/tmp/mesos/0"
> > ```
> > 
> > The `--runtime_dir` and `--work_dir` should have different values.
> > 
> > Also:
> > ```
> > [klueska@core-dev build]$ MESOS_RUNTIME_DIR=/tmp/kevin ./bin/mesos-local.sh
> > I1014 10:43:56.385072 39941 master.cpp:382] Flags at startup: ... 
> > --runtime_dir="/tmp/mesos/0" ... --work_dir="/tmp/mesos/0"
> > ```
> > 
> > I should be able to override the `--runtime_dir` with the environment 
> > variable.
> 
> Kevin Klues wrote:
> Changing `mesos-local-flags.in.sh` to have the following should address 
> both issues:
> 
> ```
> : ${MESOS_WORK_DIR:=/tmp/mesos/work_dir}
> : ${MESOS_RUNTIME_DIR:=/tmp/mesos/runtime_dir}
> 
> export MESOS_WORK_DIR
> export MESOS_RUNTIME_DIR
> ```

yep, now use `.sh` would have this problem. Use `src/mesos-local` would be fine.


- haosdent


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


On Oct. 14, 2016, 4:26 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 14, 2016, 4:26 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
>   src/local/local.cpp 257179443827ffdfc946ed655a6840fcea70d454 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> ```
> $ sudo make install
> $ mesos-local
> ...
> I1014 12:23:47.563256 4284416 slave.cpp:208] Mesos agent started on 
> (1)@127.0.0.1:5050
> I1014 12:23:47.563302 4284416 slave.cpp:209] Flags at startup: 
> --appc_simple_discovery_uri_prefix="http://; 
> --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http_readonly="false" 
> --authenticate_http_readwrite="false" --authenticatee="crammd5" 
> --authentication_backoff_factor="1secs" --authorizer="local" 
> --container_disk_watch_interval="15secs" --containerizers="mesos" 
> --default_role="*" --disk_watch_interval="1mins" --docker="docker" 
> --docker_kill_orphans="true" --docker_registry="https://registry-1.docker.io; 
> --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" 
> --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" 
> --docker_volume_checkpoint_dir="/var/run/mesos/isolators/docker/volume" 
> --enforce_container_disk_quota="false" 
> --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" --hadoop_
 home="" --help="false" --hostname_lookup="true" --http_authenticators="basic" 
--http_command_executor="false" --image_provisioner_backend="copy" 
--initialize_driver_logging="true" --isolation="posix/cpu,posix/mem" 

Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-14 Thread Kevin Klues


> On Oct. 14, 2016, 5:48 p.m., Kevin Klues wrote:
> > This still doesn't have the right semantics:
> > ```
> > [klueska@core-dev build]$ ./bin/mesos-local.sh
> > I1014 10:43:56.385072 39941 master.cpp:382] Flags at startup: ... 
> > --runtime_dir="/tmp/mesos/0" ... --work_dir="/tmp/mesos/0"
> > ```
> > 
> > The `--runtime_dir` and `--work_dir` should have different values.
> > 
> > Also:
> > ```
> > [klueska@core-dev build]$ MESOS_RUNTIME_DIR=/tmp/kevin ./bin/mesos-local.sh
> > I1014 10:43:56.385072 39941 master.cpp:382] Flags at startup: ... 
> > --runtime_dir="/tmp/mesos/0" ... --work_dir="/tmp/mesos/0"
> > ```
> > 
> > I should be able to override the `--runtime_dir` with the environment 
> > variable.

Changing `mesos-local-flags.in.sh` to have the following should address both 
issues:

```
: ${MESOS_WORK_DIR:=/tmp/mesos/work_dir}
: ${MESOS_RUNTIME_DIR:=/tmp/mesos/runtime_dir}

export MESOS_WORK_DIR
export MESOS_RUNTIME_DIR
```


- Kevin


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


On Oct. 14, 2016, 4:26 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 14, 2016, 4:26 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
>   src/local/local.cpp 257179443827ffdfc946ed655a6840fcea70d454 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> ```
> $ sudo make install
> $ mesos-local
> ...
> I1014 12:23:47.563256 4284416 slave.cpp:208] Mesos agent started on 
> (1)@127.0.0.1:5050
> I1014 12:23:47.563302 4284416 slave.cpp:209] Flags at startup: 
> --appc_simple_discovery_uri_prefix="http://; 
> --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http_readonly="false" 
> --authenticate_http_readwrite="false" --authenticatee="crammd5" 
> --authentication_backoff_factor="1secs" --authorizer="local" 
> --container_disk_watch_interval="15secs" --containerizers="mesos" 
> --default_role="*" --disk_watch_interval="1mins" --docker="docker" 
> --docker_kill_orphans="true" --docker_registry="https://registry-1.docker.io; 
> --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" 
> --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" 
> --docker_volume_checkpoint_dir="/var/run/mesos/isolators/docker/volume" 
> --enforce_container_disk_quota="false" 
> --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" --hadoop_
 home="" --help="false" --hostname_lookup="true" --http_authenticators="basic" 
--http_command_executor="false" --image_provisioner_backend="copy" 
--initialize_driver_logging="true" --isolation="posix/cpu,posix/mem" 
--launcher="posix" --launcher_dir="/usr/local/libexec/mesos" --logbufsecs="0" 
--logging_level="INFO" --max_completed_executors_per_framework="150" 

Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-14 Thread Kevin Klues

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



This still doesn't have the right semantics:
```
[klueska@core-dev build]$ ./bin/mesos-local.sh
I1014 10:43:56.385072 39941 master.cpp:382] Flags at startup: ... 
--runtime_dir="/tmp/mesos/0" ... --work_dir="/tmp/mesos/0"
```

The `--runtime_dir` and `--work_dir` should have different values.

Also:
```
[klueska@core-dev build]$ MESOS_RUNTIME_DIR=/tmp/kevin ./bin/mesos-local.sh
I1014 10:43:56.385072 39941 master.cpp:382] Flags at startup: ... 
--runtime_dir="/tmp/mesos/0" ... --work_dir="/tmp/mesos/0"
```

I should be able to override the `--runtime_dir` with the environment variable.

- Kevin Klues


On Oct. 14, 2016, 4:26 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 14, 2016, 4:26 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
>   src/local/local.cpp 257179443827ffdfc946ed655a6840fcea70d454 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> ```
> $ sudo make install
> $ mesos-local
> ...
> I1014 12:23:47.563256 4284416 slave.cpp:208] Mesos agent started on 
> (1)@127.0.0.1:5050
> I1014 12:23:47.563302 4284416 slave.cpp:209] Flags at startup: 
> --appc_simple_discovery_uri_prefix="http://; 
> --appc_store_dir="/tmp/mesos/store/appc" --authenticate_http_readonly="false" 
> --authenticate_http_readwrite="false" --authenticatee="crammd5" 
> --authentication_backoff_factor="1secs" --authorizer="local" 
> --container_disk_watch_interval="15secs" --containerizers="mesos" 
> --default_role="*" --disk_watch_interval="1mins" --docker="docker" 
> --docker_kill_orphans="true" --docker_registry="https://registry-1.docker.io; 
> --docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" 
> --docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" 
> --docker_volume_checkpoint_dir="/var/run/mesos/isolators/docker/volume" 
> --enforce_container_disk_quota="false" 
> --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" --hadoop_
 home="" --help="false" --hostname_lookup="true" --http_authenticators="basic" 
--http_command_executor="false" --image_provisioner_backend="copy" 
--initialize_driver_logging="true" --isolation="posix/cpu,posix/mem" 
--launcher="posix" --launcher_dir="/usr/local/libexec/mesos" --logbufsecs="0" 
--logging_level="INFO" --max_completed_executors_per_framework="150" 
--oversubscribed_resources_interval="15secs" 
--qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" 
--recovery_timeout="15mins" --registration_backoff_factor="1secs" 
--runtime_dir="/tmp/mesos/local/0" --sandbox_directory="/mnt/mesos/sandbox" 
--strict="true" --switch_user="true" --version="false" 
--work_dir="/tmp/mesos/local/0"
> ...
> 
> $ mesos-execute 

Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread haosdent huang


> On Oct. 13, 2016, 5:52 p.m., Kevin Klues wrote:
> > This does not work for me. I still see:
> > 
> > ```
> > [klueska@core-dev build]$ ./src/mesos-execute --master=127.0.0.1:5050 
> > --name="test-single-1" --command="sleep 2000"
> > I1013 10:47:08.270723 38083 scheduler.cpp:176] Version: 1.1.0
> > I1013 10:47:08.274955 38096 scheduler.cpp:465] New master detected at 
> > master@127.0.0.1:5050
> > Subscribed with ID fe29dfdc-07f0-49c4-8c28-9ade62291388-0001
> > Submitted task 'test-single-1' to agent 
> > 'c81be7b6-da4e-4bac-a884-df27a32f245b-S0'
> > Received status update TASK_FAILED for task 'test-single-1'
> >   message: 'Failed to launch container: Failed to make the containerizer 
> > runtime directory 
> > '/var/run/mesos/containers/8e3a559a-5b13-4460-bb7f-d1e107ab49f0': 
> > Permission denied; Abnormal executor termination: unknown container'
> >   source: SOURCE_AGENT
> >   reason: REASON_CONTAINER_LAUNCH_FAILED
> > ```
> > 
> > Digging into the code in `local.cpp`, it looks like we need to add some 
> > code in there to actually set the agent flag appropriately (just like we do 
> > for `slaveFlags.work_dir`).
> 
> haosdent huang wrote:
> Oh, I see. Because 
> 
> ```
> +export MESOS_RUNTIME_DIR=/tmp/mesos
> ```
> 
> in `mesos-local-flags.sh.in` and
> 
> ```
> Try load = slaveFlags.load("MESOS_");
> 
> ```
> 
> in `local.cpp`, it works although the code in `local.cpp` have not been 
> updated. But I think it should work in your side as well? How you launch the 
> `mesos-local`? Do you use `./bin/mesos-local.sh`?
> 
> Kevin Klues wrote:
> Yes, I ran the commands exactly as you specified. However, I didn't rerun 
> `configure`, which is why I wasn't seeing the change (since 
> `mesos-local-flags.sh` is generated at configure time). Either way, we need 
> to update `local.cpp` to handle the case when this environment variable isn't 
> set and we specify it via the flag to mesos-local itself.

Oh, thanks a lot to help verify! And I found another issue at 
https://reviews.apache.org/r/52856/ 
After apply these two patches, no matter `./bin/mesos-local.sh` or 
`mesos-local` would work as expected.


- haosdent


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


On Oct. 14, 2016, 4:26 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 14, 2016, 4:26 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
>   src/local/local.cpp 257179443827ffdfc946ed655a6840fcea70d454 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> ```
> $ sudo make install
> $ mesos-local
> ...
> I1014 12:23:47.563256 4284416 slave.cpp:208] Mesos agent started on 
> (1)@127.0.0.1:5050
> I1014 12:23:47.563302 4284416 slave.cpp:209] Flags at startup: 
> --appc_simple_discovery_uri_prefix="http://; 
> --appc_store_dir="/tmp/mesos/store/appc" 

Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread haosdent huang

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

(Updated Oct. 14, 2016, 4:26 a.m.)


Review request for mesos, Jie Yu and Kevin Klues.


Changes
---

Address @klueska's comments.


Bugs: MESOS-6380
https://issues.apache.org/jira/browse/MESOS-6380


Repository: mesos


Description
---

Set `runtime_dir` to a temporary folder in `mesos-local`.


Diffs (updated)
-

  bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
  src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
  src/local/local.cpp 257179443827ffdfc946ed655a6840fcea70d454 

Diff: https://reviews.apache.org/r/52787/diff/


Testing (updated)
---

To void this error when launch `mesos-local` without `sudo`

```
  message: 'Failed to launch container: Failed to make the containerizer 
runtime directory 
'/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
denied; Abnormal executor termination: unknown container'
```

Test produce 

```
# Run with normal user.
$ ./bin/mesos-local.sh

# Open a new session
$ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
--command="sleep 2000"
WARNING: Logging before InitGoogleLogging() is written to STDERR
W1014 00:05:22.457461 36489 scheduler.cpp:161]
**
Scheduler driver bound to loopback interface! Cannot communicate with remote 
master(s). You might want to set 'LIBPROCESS_IP' environment variable to use a 
routable IP address.
**
I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
master@127.0.0.1:5050
Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
Submitted task 'test-single-1' to agent 
'8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
Received status update TASK_RUNNING for task 'test-single-1'
  source: SOURCE_EXECUTOR
```

```
$ sudo make install
$ mesos-local
...
I1014 12:23:47.563256 4284416 slave.cpp:208] Mesos agent started on 
(1)@127.0.0.1:5050
I1014 12:23:47.563302 4284416 slave.cpp:209] Flags at startup: 
--appc_simple_discovery_uri_prefix="http://; 
--appc_store_dir="/tmp/mesos/store/appc" --authenticate_http_readonly="false" 
--authenticate_http_readwrite="false" --authenticatee="crammd5" 
--authentication_backoff_factor="1secs" --authorizer="local" 
--container_disk_watch_interval="15secs" --containerizers="mesos" 
--default_role="*" --disk_watch_interval="1mins" --docker="docker" 
--docker_kill_orphans="true" --docker_registry="https://registry-1.docker.io; 
--docker_remove_delay="6hrs" --docker_socket="/var/run/docker.sock" 
--docker_stop_timeout="0ns" --docker_store_dir="/tmp/mesos/store/docker" 
--docker_volume_checkpoint_dir="/var/run/mesos/isolators/docker/volume" 
--enforce_container_disk_quota="false" --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" --hadoop_ho
 me="" --help="false" --hostname_lookup="true" --http_authenticators="basic" 
--http_command_executor="false" --image_provisioner_backend="copy" 
--initialize_driver_logging="true" --isolation="posix/cpu,posix/mem" 
--launcher="posix" --launcher_dir="/usr/local/libexec/mesos" --logbufsecs="0" 
--logging_level="INFO" --max_completed_executors_per_framework="150" 
--oversubscribed_resources_interval="15secs" 
--qos_correction_interval_min="0ns" --quiet="false" --recover="reconnect" 
--recovery_timeout="15mins" --registration_backoff_factor="1secs" 
--runtime_dir="/tmp/mesos/local/0" --sandbox_directory="/mnt/mesos/sandbox" 
--strict="true" --switch_user="true" --version="false" 
--work_dir="/tmp/mesos/local/0"
...

$ mesos-execute --master=127.0.0.1:5050 --name="test-single-1" --command="sleep 
2000"
WARNING: Logging before InitGoogleLogging() is written to STDERR
W1014 12:25:39.922174 3211264 scheduler.cpp:161]
**
Scheduler driver bound to loopback interface! Cannot communicate with remote 
master(s). You might want to set 'LIBPROCESS_IP' environment variable to use a 
routable IP address.
**
I1014 12:25:39.922353 3211264 scheduler.cpp:176] Version: 1.1.0
I1014 12:25:39.927863 3211264 scheduler.cpp:465] New master detected at 
master@127.0.0.1:5050
Subscribed with ID b3af099b-8ee5-4fbe-b27b-fe4832b141c2-0001
Submitted task 'test-single-1' to agent 
'ed8e545b-d1e5-4d22-bc88-517be5632779-S0'
Received status update TASK_RUNNING for task 'test-single-1'
  source: SOURCE_EXECUTOR
```


Thanks,

haosdent huang



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread Kevin Klues


> On Oct. 13, 2016, 5:52 p.m., Kevin Klues wrote:
> > This does not work for me. I still see:
> > 
> > ```
> > [klueska@core-dev build]$ ./src/mesos-execute --master=127.0.0.1:5050 
> > --name="test-single-1" --command="sleep 2000"
> > I1013 10:47:08.270723 38083 scheduler.cpp:176] Version: 1.1.0
> > I1013 10:47:08.274955 38096 scheduler.cpp:465] New master detected at 
> > master@127.0.0.1:5050
> > Subscribed with ID fe29dfdc-07f0-49c4-8c28-9ade62291388-0001
> > Submitted task 'test-single-1' to agent 
> > 'c81be7b6-da4e-4bac-a884-df27a32f245b-S0'
> > Received status update TASK_FAILED for task 'test-single-1'
> >   message: 'Failed to launch container: Failed to make the containerizer 
> > runtime directory 
> > '/var/run/mesos/containers/8e3a559a-5b13-4460-bb7f-d1e107ab49f0': 
> > Permission denied; Abnormal executor termination: unknown container'
> >   source: SOURCE_AGENT
> >   reason: REASON_CONTAINER_LAUNCH_FAILED
> > ```
> > 
> > Digging into the code in `local.cpp`, it looks like we need to add some 
> > code in there to actually set the agent flag appropriately (just like we do 
> > for `slaveFlags.work_dir`).
> 
> haosdent huang wrote:
> Oh, I see. Because 
> 
> ```
> +export MESOS_RUNTIME_DIR=/tmp/mesos
> ```
> 
> in `mesos-local-flags.sh.in` and
> 
> ```
> Try load = slaveFlags.load("MESOS_");
> 
> ```
> 
> in `local.cpp`, it works although the code in `local.cpp` have not been 
> updated. But I think it should work in your side as well? How you launch the 
> `mesos-local`? Do you use `./bin/mesos-local.sh`?

Yes, I ran the commands exactly as you specified. However, I didn't rerun 
`configure`, which is why I wasn't seeing the change (since 
`mesos-local-flags.sh` is generated at configure time). Either way, we need to 
update `local.cpp` to handle the case when this environment variable isn't set 
and we specify it via the flag to mesos-local itself.


- Kevin


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


On Oct. 13, 2016, 5:06 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 13, 2016, 5:06 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread haosdent huang


> On Oct. 13, 2016, 5:52 p.m., Kevin Klues wrote:
> > This does not work for me. I still see:
> > 
> > ```
> > [klueska@core-dev build]$ ./src/mesos-execute --master=127.0.0.1:5050 
> > --name="test-single-1" --command="sleep 2000"
> > I1013 10:47:08.270723 38083 scheduler.cpp:176] Version: 1.1.0
> > I1013 10:47:08.274955 38096 scheduler.cpp:465] New master detected at 
> > master@127.0.0.1:5050
> > Subscribed with ID fe29dfdc-07f0-49c4-8c28-9ade62291388-0001
> > Submitted task 'test-single-1' to agent 
> > 'c81be7b6-da4e-4bac-a884-df27a32f245b-S0'
> > Received status update TASK_FAILED for task 'test-single-1'
> >   message: 'Failed to launch container: Failed to make the containerizer 
> > runtime directory 
> > '/var/run/mesos/containers/8e3a559a-5b13-4460-bb7f-d1e107ab49f0': 
> > Permission denied; Abnormal executor termination: unknown container'
> >   source: SOURCE_AGENT
> >   reason: REASON_CONTAINER_LAUNCH_FAILED
> > ```
> > 
> > Digging into the code in `local.cpp`, it looks like we need to add some 
> > code in there to actually set the agent flag appropriately (just like we do 
> > for `slaveFlags.work_dir`).

Oh, I see. Because 

```
+export MESOS_RUNTIME_DIR=/tmp/mesos
```

in `mesos-local-flags.sh.in` and

```
Try load = slaveFlags.load("MESOS_");

```

in `local.cpp`, it works although the code in `local.cpp` have not been 
updated. But I think it should work in your side as well? How you launch the 
`mesos-local`? Do you use `./bin/mesos-local.sh`?


- haosdent


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


On Oct. 13, 2016, 5:06 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 13, 2016, 5:06 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread Kevin Klues

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



This does not work for me. I still see:

```
[klueska@core-dev build]$ ./src/mesos-execute --master=127.0.0.1:5050 
--name="test-single-1" --command="sleep 2000"
I1013 10:47:08.270723 38083 scheduler.cpp:176] Version: 1.1.0
I1013 10:47:08.274955 38096 scheduler.cpp:465] New master detected at 
master@127.0.0.1:5050
Subscribed with ID fe29dfdc-07f0-49c4-8c28-9ade62291388-0001
Submitted task 'test-single-1' to agent 
'c81be7b6-da4e-4bac-a884-df27a32f245b-S0'
Received status update TASK_FAILED for task 'test-single-1'
  message: 'Failed to launch container: Failed to make the containerizer 
runtime directory 
'/var/run/mesos/containers/8e3a559a-5b13-4460-bb7f-d1e107ab49f0': Permission 
denied; Abnormal executor termination: unknown container'
  source: SOURCE_AGENT
  reason: REASON_CONTAINER_LAUNCH_FAILED
```

Digging into the code in `local.cpp`, it looks like we need to add some code in 
there to actually set the agent flag appropriately (just like we do for 
`slaveFlags.work_dir`).

- Kevin Klues


On Oct. 13, 2016, 5:06 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 13, 2016, 5:06 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread haosdent huang


> On Oct. 13, 2016, 4:59 p.m., Kevin Klues wrote:
> > Can you write the exact test procedure you used to run the command and test 
> > it?

Got it! Added.


- haosdent


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


On Oct. 13, 2016, 5:06 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 13, 2016, 5:06 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> Test produce 
> 
> ```
> # Run with normal user.
> $ ./bin/mesos-local.sh
> 
> # Open a new session
> $ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
> --command="sleep 2000"
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> W1014 00:05:22.457461 36489 scheduler.cpp:161]
> **
> Scheduler driver bound to loopback interface! Cannot communicate with remote 
> master(s). You might want to set 'LIBPROCESS_IP' environment variable to use 
> a routable IP address.
> **
> I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
> I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
> master@127.0.0.1:5050
> Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
> Submitted task 'test-single-1' to agent 
> '8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
> Received status update TASK_RUNNING for task 'test-single-1'
>   source: SOURCE_EXECUTOR
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread haosdent huang

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

(Updated Oct. 13, 2016, 5:06 p.m.)


Review request for mesos, Jie Yu and Kevin Klues.


Changes
---

Updated `Testing done`


Bugs: MESOS-6380
https://issues.apache.org/jira/browse/MESOS-6380


Repository: mesos


Description
---

Set `runtime_dir` to a temporary folder in `mesos-local`.


Diffs
-

  bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
  src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 

Diff: https://reviews.apache.org/r/52787/diff/


Testing (updated)
---

To void this error when launch `mesos-local` without `sudo`

```
  message: 'Failed to launch container: Failed to make the containerizer 
runtime directory 
'/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
denied; Abnormal executor termination: unknown container'
```

Test produce 

```
# Run with normal user.
$ ./bin/mesos-local.sh

# Open a new session
$ ./src/mesos-execute --master=127.0.0.1:5050 --name="test-single-1" 
--command="sleep 2000"
WARNING: Logging before InitGoogleLogging() is written to STDERR
W1014 00:05:22.457461 36489 scheduler.cpp:161]
**
Scheduler driver bound to loopback interface! Cannot communicate with remote 
master(s). You might want to set 'LIBPROCESS_IP' environment variable to use a 
routable IP address.
**
I1014 00:05:22.457690 36489 scheduler.cpp:176] Version: 1.1.0
I1014 00:05:22.596534 36497 scheduler.cpp:465] New master detected at 
master@127.0.0.1:5050
Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-
Submitted task 'test-single-1' to agent 
'8fba7ecb-b70e-48ac-9541-2070c4d9b1d5-S0'
Received status update TASK_RUNNING for task 'test-single-1'
  source: SOURCE_EXECUTOR
```


Thanks,

haosdent huang



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread Kevin Klues

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



Can you write the exact test procedure you used to run the command and test it?

- Kevin Klues


On Oct. 13, 2016, 6:44 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 13, 2016, 6:44 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [52787]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' 
CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; 
./support/docker_build.sh

- Mesos ReviewBot


On Oct. 13, 2016, 6:44 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 13, 2016, 6:44 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread haosdent huang


> On Oct. 13, 2016, 5:48 a.m., Kevin Klues wrote:
> > I should have looked at this more carefully before giving it a Ship it. It 
> > seemed reasonable at first glance though.
> > 
> > Did you attempt to compile it before posting the patch? Looks like there 
> > were errors with the flags definition.
> > 
> > ```
> > In file included from ../../src/local/main.cpp:26:0:
> > ../../src/local/flags.hpp: In constructor 
> > 'mesos::internal::local::Flags::Flags()':
> > ../../src/local/flags.hpp:54:10: error: 'runtime_dir' is not a member of 
> > 'mesos::internal::local::Flags'
> >  add(::runtime_dir,
> > ```

My bad that compile wrong branch when test. Now fixed, may you help review this 
again? Thank you in advance.


- haosdent


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


On Oct. 13, 2016, 6:44 a.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 13, 2016, 6:44 a.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Bugs: MESOS-6380
> https://issues.apache.org/jira/browse/MESOS-6380
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-13 Thread haosdent huang

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

(Updated Oct. 13, 2016, 6:44 a.m.)


Review request for mesos, Jie Yu and Kevin Klues.


Changes
---

Updated the patch.


Bugs: MESOS-6380
https://issues.apache.org/jira/browse/MESOS-6380


Repository: mesos


Description
---

Set `runtime_dir` to a temporary folder in `mesos-local`.


Diffs (updated)
-

  bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
  src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 

Diff: https://reviews.apache.org/r/52787/diff/


Testing
---

To void this error when launch `mesos-local` without `sudo`

```
  message: 'Failed to launch container: Failed to make the containerizer 
runtime directory 
'/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
denied; Abnormal executor termination: unknown container'
```


Thanks,

haosdent huang



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-12 Thread Kevin Klues

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



I should have looked at this more carefully before giving it a Ship it. It 
seemed reasonable at first glance though.

Did you attempt to compile it before posting the patch? Looks like there were 
errors with the flags definition.

```
In file included from ../../src/local/main.cpp:26:0:
../../src/local/flags.hpp: In constructor 
'mesos::internal::local::Flags::Flags()':
../../src/local/flags.hpp:54:10: error: 'runtime_dir' is not a member of 
'mesos::internal::local::Flags'
 add(::runtime_dir,
```

- Kevin Klues


On Oct. 12, 2016, 4:13 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 12, 2016, 4:13 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-12 Thread Kevin Klues


> On Oct. 12, 2016, 10:10 p.m., Kevin Klues wrote:
> > Ship It!

Can you link this to the proper JIRA?


- Kevin


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


On Oct. 12, 2016, 4:13 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 12, 2016, 4:13 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Re: Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-12 Thread Kevin Klues

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


Ship it!




Ship It!

- Kevin Klues


On Oct. 12, 2016, 4:13 p.m., haosdent huang wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52787/
> ---
> 
> (Updated Oct. 12, 2016, 4:13 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Kevin Klues.
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> Set `runtime_dir` to a temporary folder in `mesos-local`.
> 
> 
> Diffs
> -
> 
>   bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
>   src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 
> 
> Diff: https://reviews.apache.org/r/52787/diff/
> 
> 
> Testing
> ---
> 
> To void this error when launch `mesos-local` without `sudo`
> 
> ```
>   message: 'Failed to launch container: Failed to make the containerizer 
> runtime directory 
> '/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
> denied; Abnormal executor termination: unknown container'
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>



Review Request 52787: Set `runtime_dir` to a temporary folder in `mesos-local`.

2016-10-12 Thread haosdent huang

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

Review request for mesos, Jie Yu and Kevin Klues.


Repository: mesos


Description
---

Set `runtime_dir` to a temporary folder in `mesos-local`.


Diffs
-

  bin/mesos-local-flags.sh.in 5b4553a808dc9f34a15390e69b2f85e95761ec53 
  src/local/flags.hpp c77eff13e7a63630ff6c9428e57f3f6707e1f30f 

Diff: https://reviews.apache.org/r/52787/diff/


Testing
---

To void this error when launch `mesos-local` without `sudo`

```
  message: 'Failed to launch container: Failed to make the containerizer 
runtime directory 
'/var/run/mesos/containers/f2d6947f-2916-4f1a-90dc-3d137b360b9c': Permission 
denied; Abnormal executor termination: unknown container'
```


Thanks,

haosdent huang