[ 
https://issues.apache.org/jira/browse/MESOS-7212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15897516#comment-15897516
 ] 

Gastón Kleiman commented on MESOS-7212:
---------------------------------------

This behaviour is documented in {{mesos.proto}} 
(https://github.com/apache/mesos/blob/5ac6e156390717c34586e6e19fee4bc4cb6b01d5/include/mesos/mesos.proto#L621-L626):

{noformat}
  // 2) If 'shell == false', the command will be launched by passing
  //            arguments to an executable. The 'value' specified will be
  //            treated as the filename of the executable. The 'arguments'
  //            will be treated as the arguments to the executable. This is
  //            similar to how POSIX exec families launch processes (i.e.,
  //            execlp(value, arguments(0), arguments(1), ...)).
{noformat}

The POSIX exec calls expect first argument to be the name of the exec'd file.

> CommandInfo first argument is ignored
> -------------------------------------
>
>                 Key: MESOS-7212
>                 URL: https://issues.apache.org/jira/browse/MESOS-7212
>             Project: Mesos
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>         Environment: MacOS Sierra 10.12.2
>            Reporter: Egor Ryashin
>
> First argument of CommandInfo is ignored, for example using:
> {code}
>                 CommandInfo commandInfo = CommandInfo.newBuilder() 
>                     .setShell(false) 
>                     .addArguments("1") 
>                     .addArguments("2") 
>                     .addArguments("3") 
>                     .setValue("echo")
> {code}
> I get in the sandbox stdout:
> {noformat}
> Starting task ta35555e2-6234-4f8c-a609-e4b9064b4cf5
> /usr/local/Cellar/mesos/1.1.0/libexec/mesos/mesos-containerizer launch 
> --command="{"arguments":["1","2","3"],"shell":false,"value":"echo"}" 
> --help="false"
> Forked command at 95660
> 2 3
> Command exited with status 0 (pid: 95660)
>                {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to