> On May 12, 2015, 5:58 a.m., Adam B wrote:
> > Sorry it took me so long to circle back to this. I'll fix these minor nits 
> > myself and then commit it for you.
> > Thanks!

Thank you very much. I update the code to fix these issues. Could you help me 
review again? Thank you.


- haosdent


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


On May 12, 2015, 6:24 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33109/
> -----------------------------------------------------------
> 
> (Updated May 12, 2015, 6:24 a.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: MESOS-2023
>     https://issues.apache.org/jira/browse/MESOS-2023
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Allow setting environment variables in mesos-execute
> 
> 
> Diffs
> -----
> 
>   .clang-format PRE-CREATION 
>   .gitignore-template 934cad71a370d5c64d9a0994f775f39db74f5851 
>   3rdparty/libprocess/3rdparty/stout/README.md 
> 588f7393c43d528834aab8b6a14e4aee281417f3 
>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am 
> 79239d738d0607364f8c3d7addfd54a642bdffc0 
>   3rdparty/libprocess/3rdparty/stout/include/stout/format.hpp 
> abe1a1d43659bda8e6af4f76c0ae4d1ad4b1c8c5 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashset.hpp 
> 21b059937f55927644ac3b19e1b5ccb1b45b6237 
>   3rdparty/libprocess/3rdparty/stout/include/stout/json.hpp 
> 8784e76d79c7fb8d1a88dda4b0d5cbf6cdb12772 
>   3rdparty/libprocess/3rdparty/stout/include/stout/lambda.hpp 
> 6cbb2ac50dd23d78465e8690112fc01114ada07b 
>   3rdparty/libprocess/3rdparty/stout/include/stout/memory.hpp 
> dfaef77fa1af857c13e5d8705505dd86f5108578 
>   3rdparty/libprocess/3rdparty/stout/include/stout/option.hpp 
> ea79b501d9ed7b7da9636ce9c9c590738a586993 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/fork.hpp 
> d72b4c19573be6f4eebfadef3c36cff350312bbb 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/pstree.hpp 
> 9426895f2bf3f77a5ba7ec87b97a2cbfe79adbf4 
>   3rdparty/libprocess/3rdparty/stout/include/stout/tuple.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/json_tests.cpp 
> 60c0336082caf30b2d7943d85ef3bb7a534648d8 
>   3rdparty/libprocess/configure.ac c5106cd09901781ca77d8c02c73919553a085876 
>   3rdparty/libprocess/include/Makefile.am 
> 8aab0593f296c7aae71289f9bd6cf3eb3578a721 
>   3rdparty/libprocess/include/process/c++11/defer.hpp PRE-CREATION 
>   3rdparty/libprocess/include/process/c++11/deferred.hpp PRE-CREATION 
>   3rdparty/libprocess/include/process/c++11/delay.hpp PRE-CREATION 
>   3rdparty/libprocess/include/process/c++11/dispatch.hpp PRE-CREATION 
>   3rdparty/libprocess/include/process/c++11/executor.hpp PRE-CREATION 
>   3rdparty/libprocess/include/process/collect.hpp 
> c713c1bbc13ee50ae8c9773ee971a1b565be50f4 
>   3rdparty/libprocess/include/process/defer.hpp 
> 7c04736a3d29bf2c87057efb393ab3f9bdaa10eb 
>   3rdparty/libprocess/include/process/deferred.hpp 
> 3746d692f2c9a42f7865f83b74ed64b847181ffa 
>   3rdparty/libprocess/include/process/delay.hpp 
> 29e353246e270f853ed33c1fb677d35cdfcf41ca 
>   3rdparty/libprocess/include/process/dispatch.hpp 
> 617fd43394074fa3e1f0e656ff175e651137c86c 
>   3rdparty/libprocess/include/process/event.hpp 
> ad4a8f4f1de1f78f9af89954fd9c038eb2756ce4 
>   3rdparty/libprocess/include/process/executor.hpp 
> 157a1d29fa6e64f823b0ab40ec51889bf8947f60 
>   3rdparty/libprocess/include/process/future.hpp 
> c22d6c85cd52f7b91e47b6aee3dc4ed62978d245 
>   3rdparty/libprocess/include/process/http.hpp 
> 058fa02eeecdf31023db731734257a924d770079 
>   3rdparty/libprocess/include/process/metrics/counter.hpp 
> f9cab39907a7c5643576214c5dc00858808d1a56 
>   3rdparty/libprocess/include/process/metrics/gauge.hpp 
> 7d02cd5c2947b382b67fedc4ee912281a0c78b3b 
>   3rdparty/libprocess/include/process/metrics/metric.hpp 
> a7be2d793b75d6bf1f28ddd8d5360540323228f4 
>   3rdparty/libprocess/include/process/metrics/timer.hpp 
> b6f9fbd51279a702aa6875587311c06f6b6c5720 
>   3rdparty/libprocess/include/process/mutex.hpp 
> 99dd14f2883658e483807a4323d85bf80e05e7cb 
>   3rdparty/libprocess/include/process/owned.hpp 
> 054111316d6874026ac84496aa3f66fece11f861 
>   3rdparty/libprocess/include/process/queue.hpp 
> df8efc0752197a3fef2121e4355e128ff22a19db 
>   3rdparty/libprocess/include/process/run.hpp 
> a0d7286ce8470c2513258a2d6167a4a258a3f7bf 
>   3rdparty/libprocess/include/process/shared.hpp 
> d80fb7f236ffe12ede40b56668f0e992d41f8aec 
>   3rdparty/libprocess/include/process/subprocess.hpp 
> 37cab7755d2890619b64e1ca09e0b7ad0e72cf76 
>   3rdparty/libprocess/include/process/timeseries.hpp 
> ec0ac67bed5563bd85694d9ce9230450823f3b49 
>   3rdparty/libprocess/src/http.cpp 67983ee4daf0601202c9360fe40ed28e9ef74755 
>   3rdparty/libprocess/src/io.cpp 4944e2873ea858401cec592305e92f49cdfcb2a5 
>   3rdparty/libprocess/src/libev_poll.cpp 
> 6191be3bb9f5df80ae21c2d5da8e575f7df00e84 
>   3rdparty/libprocess/src/process.cpp 
> 588bd3e40a0b350ceca15bb8f3f78290ba41d173 
>   3rdparty/libprocess/src/tests/http_tests.cpp 
> d29cd29d8c0544671a09d204ca8ba4f24340e2de 
>   3rdparty/libprocess/src/tests/process_tests.cpp 
> 67e582cc250a9767a389e2bd0cc68985477f3ffb 
>   CHANGELOG f8d998dd31018546ae1ec646aeb128b9fb708f8d 
>   bootstrap 779b33cdcb88b2417769bb046a17b47cd6042f2d 
>   configure.ac fa53bbd416dffc3987f8ec28bd9a8ce2b32d6831 
>   docs/clang-format.md 909a253b699fca37ae4ea0f8c9d680c9a5f012ed 
>   docs/mesos-c++-style-guide.md 13312f6f4fe1788791479bd768f60df0a8e80e69 
>   docs/powered-by-mesos.md bfafc2e3fbdf0c5b2092840a9e4a3ba348c34c40 
>   docs/release-guide.md 38ecbec75db59b457c3b55003665a51ba10fc254 
>   include/mesos/mesos.proto db4fc8c001dd68bc3b9ca83650170c4f26db18c7 
>   include/mesos/resources.hpp 4c036d36e0e8ab3852786dd32b2d983d45891624 
>   include/mesos/scheduler.hpp 2ee6b5cc0745b3ac4637bb97843a00024fb94570 
>   include/mesos/scheduler/scheduler.proto 
> 249ec532b53fe428b7e66be4ced8223e66535b49 
>   include/mesos/type_utils.hpp 044637481e5405d4d6f61653a9f9386edd191deb 
>   src/Makefile.am 54271f7bf8c104e5762d228a2076c8bbec8a3f83 
>   src/cli/execute.cpp 84f70dccbc2c5dd43f68105d967f4488c82f582b 
>   src/common/parse.hpp 487180ceb82f1dc0f91c8d7844565837e9700f4b 
>   src/common/resources.cpp 235930ff2dbb3ea49a3a0696dc070f2bd56fba4b 
>   src/examples/balloon_executor.cpp 6166f511b8977bc3b6f876de19f1cd91a4a8f03d 
>   src/examples/low_level_scheduler_libprocess.cpp 
> bee2e7ef8432cc42733260c668f1100c68f73b8d 
>   src/examples/low_level_scheduler_pthread.cpp 
> fb8cd66c2e94270971184c1e3dcc92eccab8b223 
>   src/linux/routing/filter/arp.hpp PRE-CREATION 
>   src/linux/routing/filter/basic.hpp 99b0b058633403e334e7230dfa7d705c99b3cb10 
>   src/linux/routing/filter/basic.cpp 755be7de5c43c2f3b336af6cb47af9c97a21218c 
>   src/linux/routing/filter/filter.hpp 
> 024582cf8274da2e5bcccc4ebd00fcf83d6930e2 
>   src/linux/routing/filter/icmp.hpp d55eeee8f1e31036e75780c52690e812de265ec6 
>   src/linux/routing/filter/icmp.cpp 60703e727ecab9557911ab0562773771db51db90 
>   src/linux/routing/filter/internal.hpp 
> c74098dab97807084e6630998da354265680c763 
>   src/linux/routing/filter/ip.hpp 62bb5f89d35fc9622fca303aa01a789fcfbf2f76 
>   src/linux/routing/filter/ip.cpp 0d25e2d4f0ac4c3f151ad40e796dbdbc54dba9fa 
>   src/linux/routing/internal.hpp 7e636cdf10996735036b2c5db4db981215e6faa4 
>   src/linux/routing/queueing/handle.hpp 
> 5f0cb7775f9190caba6b85cabf9019a97b2a7de2 
>   src/local/local.cpp dda25ab348c6430360c4b88e1d93dc70d14738d2 
>   src/log/log.cpp 5675cefb348605cd176a93c716a57c058cb02318 
>   src/master/http.cpp acc85b60bc6ca3139fd3daee445f8f2023afa8c6 
>   src/master/main.cpp 18f8c3178459da0cbf23a1817ec49cd9d3998bfd 
>   src/master/master.hpp ee53dfbaafcc9d5764fbff32aca7c6552cdf9a24 
>   src/master/master.cpp 4ad683eb1f58c277e4a7bc370a9269431b755807 
>   src/master/validation.hpp a74e844b39595deb9d907cc8ab1b8aee622a8765 
>   src/master/validation.cpp c3e96ae0e684f3f365e9aa365bccc953d32b0452 
>   src/messages/messages.proto 98d859f3db6013a2e155d838f590a0cde6dc5ed5 
>   src/sched/sched.cpp 8c366ec3e3cf55dacf49483e1ceeef61ab0187b3 
>   src/scheduler/scheduler.cpp f613ca44c83df50e46a4a6656dde826f569c9092 
>   src/slave/containerizer/external_containerizer.hpp 
> c00cebb93c5395bccbef558632d8f9c9bee8fffa 
>   src/slave/containerizer/external_containerizer.cpp 
> 33fc010393e1e664c3b50d849284b14275b29377 
>   src/slave/containerizer/isolators/network/port_mapping.cpp 
> a4abaff30bb4646b1b1edfdbbc243c9e3f6851df 
>   src/slave/containerizer/isolators/posix/disk.cpp 
> caf81e8bc30c0877f4d87c12a0f1073b9553d454 
>   src/slave/http.cpp b5e77b09435e50db5231a2b32faf76dab91dae54 
>   src/slave/slave.hpp adb52b587ae151a51cf21ebd4923aaec1548ef10 
>   src/slave/slave.cpp bf290bfd7d9a59ce7197ce34cbd8cf42e7dd17a3 
>   src/slave/state.hpp fed4b7ecf9572a8dbb1a99dbb1769d3e55ef7bc5 
>   src/tests/cluster.hpp 95061665974a7aca98c374735dd9520278d89043 
>   src/tests/master_tests.cpp 75ffadae64ece4e3ff53abeefa5f6e8e3690d402 
>   src/tests/master_validation_tests.cpp 
> 1366bcd229f4cb62df7d181c42dae4152435bb14 
>   src/tests/memory_test_helper.cpp 8093e66c45cacc4bf0295a3448c128a1aa7c751a 
>   src/tests/mesos.hpp 563b833f8563ee6687ef95143815ed38dff71657 
>   src/tests/mesos.cpp bc082e8d91deb2c5dd64bbc3f0a8a50fa7d19264 
>   src/tests/resources_tests.cpp a7ec59ea217ad71f7d1e93ca6039d5b2491b3237 
>   src/tests/routing_tests.cpp 6bf5e63aecf2dee36fb8cf3575c0bd2625d29dfa 
>   src/tests/scheduler_tests.cpp cbe6c91a1b4f864ceb11cf062da0ada6c9666f9f 
>   src/tests/slave_tests.cpp 04e79ec061e767a82d40242be7884967942c50b6 
>   src/webui/master/static/js/controllers.js 
> 93846940ddbbc9f25de9a41f10c899c16e564d88 
>   src/zookeeper/zookeeper.cpp 11ace5aaa8d4e7ef67226a51b96e142686df5b8b 
> 
> Diff: https://reviews.apache.org/r/33109/diff/
> 
> 
> Testing
> -------
> 
> ### Test without env
> 
> ```
> $ ./src/mesos-execute  --master=127.0.0.1:5050 --name=test --command='echo $a'
> ```
> 
> The log from mesos, we could see the output is empty
> 
> ```
> Registered executor on localhostI0423 01:27:37.180140 14061 slave.cpp:1540] 
> Sending queued task 'test' to executor 'test' of framework 
> 20150423-012731-16777343-5050-14024-0000
> Starting task test
> Forked command at 14133
> sh -c 'echo $a'
> 
> I0423 01:27:37.183823 14064 slave.cpp:2507] Handling status update 
> TASK_RUNNING (UUID: be8664ab-a4ca-409e-87e4-de3756506c4a) for task test of 
> framework 20150423-012731-16777343-5050-14024-0000 from 
> executor(1)@127.0.0.1:33700
> ```
> 
> ### Test with env from command
> 
> ```
> $ ./src/mesos-execute  --master=127.0.0.1:5050 --name=test --command='echo 
> $a' --env="{\"a\": \"stdin\"}"
> ```
> 
> The log from mesos, we could see the output is "stdin"
> 
> ```
> Registered executor on localhost
> Starting task test
> sh -c 'echo $a'
> Forked command at 14783
> "stdin"
> I0423 01:30:41.750128 14063 slave.cpp:2507] Handling status update 
> TASK_RUNNING (UUID: e8b6cf52-9635-4393-94de-b16869e50c91) for task test of 
> framework 20150423-012731-16777343-5050-14024-0001 from 
> executor(1)@127.0.0.1:40051
> ```
> 
> ### Test with env from file
> 
> ```
> $ cat /tmp/env
> {"a": "file"}
> ```
> 
> ```
> $ ./src/mesos-execute  --master=127.0.0.1:5050 --name=test --command='echo 
> $a' --env="file:///tmp/env"
> ```
> 
> The log from mesos, we could see the output is "file"
> 
> ```
> Registered executor on localhost
> Starting task testsh -c 'echo $a'
> Forked command at 15258
> "file"
> I0423 01:32:49.817705 14065 slave.cpp:2507] Handling status update 
> TASK_RUNNING (UUID: 9e8945d0-4921-41e8-a8e2-d64ec36eea16) for task test of 
> framework 20150423-012731-16777343-5050-14024-0002 from 
> executor(1)@127.0.0.1:56334
> ```
> 
> 
> Thanks,
> 
> haosdent huang
> 
>

Reply via email to