> 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 > > [email protected]: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<flags::Warnings> 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 > [email protected]:5050 > Subscribed with ID 51e0d33f-d7b2-4c01-9bb3-10731cc7d1ab-0000 > 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 scheduler.cpp:176] Version: 1.1.0 > I1014 12:25:39.927863 3211264 scheduler.cpp:465] New master detected at > [email protected]: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 > >
