----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57764/#review169812 -----------------------------------------------------------
Good direction, but let's kill the `commandString` altogether and at least log the `command` that the launcher will execute. src/launcher/posix/executor.cpp Line 143 (original), 143 (patched) <https://reviews.apache.org/r/57764/#comment242446> Do we need to worry about this `commandString` too? This is an executor abort, so it would show up in the sandbox log, right? In fact, `commandString` is only used for these two log lines. `subprocess()` takes the path, `argv`, and `launchFlags`. So if you're not logging it, you can remove it entirely. src/launcher/posix/executor.cpp Line 146 (original), 146-147 (patched) <https://reviews.apache.org/r/57764/#comment242448> Rather than leaving out the launchFlags/launchInfo entirely, maybe you could at least log the `launchInfo.command` (and `launchInfo.user`?) Something like `"Running 'mesos-containerizer launch' to execute '<command>' as '<user>'."` - Adam B On March 22, 2017, 3:50 p.m., Till Toenshoff wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57764/ > ----------------------------------------------------------- > > (Updated March 22, 2017, 3:50 p.m.) > > > Review request for mesos, Adam B, Alexander Rukletsov, Benjamin Bannier, Jie > Yu, and Joseph Wu. > > > Bugs: MESOS-7265 > https://issues.apache.org/jira/browse/MESOS-7265 > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > src/launcher/posix/executor.cpp 59e7c0c7737e96059f117899eb4d9e69f2c8369d > > > Diff: https://reviews.apache.org/r/57764/diff/1/ > > > Testing > ------- > > make check & functional testing... > > ``` > $ ./src/mesos-execute --name="test" --env='{"key1":"value1"}' > --command='sleep 1000' --master=127.0.0.1:5050 > ``` > > `stdout` before applying this: > ``` > Received SUBSCRIBED event > Subscribed executor on lobomacpro2.fritz.box > Received LAUNCH event > Starting task test > /Users/till/Development/mesos-private/build/src/mesos-containerizer launch > --help="false" > --launch_info="{"command":{"environment":{"variables":[{"name":"key1","type":"VALUE","value":"value1"}]},"shell":true,"value":"sleep > > 1000"},"environment":{"variables":[{"name":"BIN_SH","type":"VALUE","value":"xpg4"},{"name":"DUALCASE","type":"VALUE","value":"1"},{"name":"DYLD_LIBRARY_PATH","type":"VALUE","value":"\/Users\/till\/Development\/mesos-private\/build\/src\/.libs"},{"name":"LIBPROCESS_PORT","type":"VALUE","value":"0"},{"name":"MESOS_AGENT_ENDPOINT","type":"VALUE","value":"192.168.178.20:5051"},{"name":"MESOS_CHECKPOINT","type":"VALUE","value":"0"},{"name":"MESOS_DIRECTORY","type":"VALUE","value":"\/tmp\/mesos\/slaves\/816619b6-f5ce-42d6-ad6b-2ef2001adc0a-S0\/frameworks\/c84f9ee5-8a6b-4f6c-9fc0-154bceb3c615-0000\/executors\/test\/runs\/025c1d1a-6886-4b42-9313-0b1a411d5e39"},{"name":"MESOS_EXECUTOR_ID","type":"VALUE","value":"test"},{"name":"MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD","type" :"VALUE","value":"5secs"},{"name":"MESOS_FRAMEWORK_ID","type":"VALUE","value":"c84f9ee5-8a6b-4f6c-9fc0-154bceb3c615-0000"},{"name":"MESOS_HTTP_COMMAND_EXECUTOR","type":"VALUE","value":"0"},{"name":"MESOS_SANDBOX","type":"VALUE","value":"\/tmp\/mesos\/slaves\/816619b6-f5ce-42d6-ad6b-2ef2001adc0a-S0\/frameworks\/c84f9ee5-8a6b-4f6c-9fc0-154bceb3c615-0000\/executors\/test\/runs\/025c1d1a-6886-4b42-9313-0b1a411d5e39"},{"name":"MESOS_SLAVE_ID","type":"VALUE","value":"816619b6-f5ce-42d6-ad6b-2ef2001adc0a-S0"},{"name":"MESOS_SLAVE_PID","type":"VALUE","value":"slave(1)@192.168.178.20:5051"},{"name":"PATH","type":"VALUE","value":"\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin"},{"name":"PWD","type":"VALUE","value":"\/private\/tmp\/mesos\/slaves\/816619b6-f5ce-42d6-ad6b-2ef2001adc0a-S0\/frameworks\/c84f9ee5-8a6b-4f6c-9fc0-154bceb3c615-0000\/executors\/test\/runs\/025c1d1a-6886-4b42-9313-0b1a411d5e39"},{"name":"SHLVL","type":"VALUE","value":"0"},{"name":"__CF_USER_TEXT _ENCODING","type":"VALUE","value":"0x1F5:0x0:0x0"},{"name":"key1","type":"VALUE","value":"value1"},{"name":"key1","type":"VALUE","value":"value1"}]}}" > Forked command at 2376 > Overwriting environment variable 'key1', original: 'value1', new: 'value1' > ``` > > after applying this: > ``` > Received SUBSCRIBED event > Subscribed executor on lobomacpro2.fritz.box > Received LAUNCH event > Starting task test > Running /Users/till/Development/mesos-private/build/src/mesos-containerizer > launch [***] > Forked command at 21513 > Overwriting environment variable 'key1', original: 'value1', new: 'value1' > ``` > > > Thanks, > > Till Toenshoff > >