+1 on using docker mode, this can help the framework developer. Setting the command twice can sometimes make people confused. When I was working for the patch https://reviews.apache.org/r/44441/ , I was also a bit confused before go through the code in agent part.
On Sat, Apr 2, 2016 at 1:17 AM, haosdent <haosd...@gmail.com> wrote: > +1 For follow Docker behaviour, it is inconvenient to write the command > twice. > > On Fri, Apr 1, 2016 at 10:12 PM, Alex Rukletsov <a...@mesosphere.com> > wrote: > > > When launching a command task without wrapping it in `/bin/sh -c` (i.e. > > CommandInfo.shell=false), Mesos expects the first argument to be the same > > as the command itself [1]. Though this is similar to how UNIX exec* calls > > operate, it can be unclear to a user. Moreover, we do not validate this > on > > the master side, but rather let the command executor crash with a "bad > > address" error. Docker, for example, requires the command only once in > > their entrypoint specification [2]. > > > > My suggestion is to change the command executor so that it ensures that > the > > first argument is always the command itself. > > > > Alternatively, if we prefer to keep the current behaviour, I would > propose > > to adjust the documentation to be more explicit and introduce a > validation > > check on the master. > > > > [1] Example snippet in C++ > > > > commandInfo->set_value(command); > > > > commandInfo->add_arguments()->assign(command); > > > > > > [2] https://docs.docker.com/engine/reference/builder/#entrypoint > > > > > > -- > Best Regards, > Haosdent Huang >