> On Oct. 23, 2014, 5:48 p.m., Jie Yu wrote: > > src/tests/slave_tests.cpp, lines 431-436 > > <https://reviews.apache.org/r/26622/diff/2/?file=719278#file719278line431> > > > > It would be great if you can write an end-to-end test so that we can > > verify that the 'command' actually runs correctly with shell=false and has > > an argument list (refer to the following test). > > R.B. Boyer wrote: > I would love to try writing an e2e test to test this, but I spent several > hours on it before caving and just writing this GetExecutorInfo test. I have > about zero experience writing C++ code let alone C++ unit tests so I was > fighting with the project more than fighting with the bug. > > Timothy Chen wrote: > You can pretty much copy the MesosExecutorWithOverride test in > slave_tests.cpp, and just modify the CommandInfo accordingly. Let us know if > you still don't know what to do and spend too much time figuring out.
I think what I had trouble with there when last I was working on that was actually asserting that mesos-executor died (exit != 0) when passed double-dash arguments. I could get the test to pass, but it also passed without the fix. > On Oct. 23, 2014, 5:48 p.m., Jie Yu wrote: > > src/slave/slave.cpp, lines 2558-2561 > > <https://reviews.apache.org/r/26622/diff/2/?file=719277#file719277line2558> > > > > The comments here are confusing. We need to explictly call out that the > > reason we copying uris, environments and user is because we do not perform > > fetch/setting environments/change user in mesos-executor. We reply on > > containerizer to do that for mesos-executor so that the task can inherit > > those settings. > > R.B. Boyer wrote: > Ah so mesos-executor requires only "uris", "environment", AND "user"? If > that's the case I'm totally rewriting this to do explicit copying instead of > playing protobuf tricks with merging. > > Jie Yu wrote: > Rest of the fields are explicitly set in this function. I am not sure > about 'container' because it's being deprecated. To be safe, let's copy > 'container' as well. Will do: [uris, environment, user, container] - R.B. ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26622/#review58149 ----------------------------------------------------------- On Oct. 17, 2014, 11:40 p.m., R.B. Boyer wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26622/ > ----------------------------------------------------------- > > (Updated Oct. 17, 2014, 11:40 p.m.) > > > Review request for mesos, Benjamin Hindman, Jie Yu, and Timothy Chen. > > > Bugs: MESOS-1873 > https://issues.apache.org/jira/browse/MESOS-1873 > > > Repository: mesos-git > > > Description > ------- > > Basically if you use "shell=false" with a non-empty argument list and the > Command Executor it is completely broken. > > When we clone the env vars to fork "mesos-executor" all of the original cmd > args are cloned as well (unintentionally) due to some protocol-buffer merge > shenanigans. > > Don't pass task-related arguments to mesos-executor. > > The description on the linked jira ticket goes into more detail. > > > Diffs > ----- > > src/slave/slave.cpp 0e342ed > src/tests/slave_tests.cpp f585bdd > > Diff: https://reviews.apache.org/r/26622/diff/ > > > Testing > ------- > > make check > > added new test "SlaveTest.GetExecutorInfo" verifying the explicit desired > behavior. > > > Thanks, > > R.B. Boyer > >
