mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guangya Liu <gyliu...@gmail.com>
Subject Re: Review Request 44441: Treated command as executable value and arguments in mesos-execute.
Date Thu, 28 Apr 2016 01:13:48 GMT


> On 四月 13, 2016, 10:29 a.m., Alexander Rukletsov wrote:
> > src/cli/execute.cpp, lines 103-104
> > <https://reviews.apache.org/r/44441/diff/7/?file=1342235#file1342235line103>
> >
> >     Why have you removed the TODO without adding a word about how `command` works
wiht containers?

Alex, does the comments for the command OK? I was only highlighting executable and shell command
but not entrypoint. I have append some comments at https://reviews.apache.org/r/45926/ , can
you please take a look? I think that entrypoint does not fit into the comments well, `the
entrypoint can be only specified in a docker image but not a command`.

        "If 'shell' is true, the command will be launched via shell\n"
        "(i.e., /bin/sh -c 'command'). The 'command' specified will\n"
        "be treated as the shell command.\n"
        "If 'shell' is false, the command will be launched by passing\n"
        "arguments to an executable. The 'command' specified will be\n"
        "treated as the filename of the executable and the 'arguments'\n"
        "to the executable. This is similar to how POSIX exec families\n"
        "launch processes (i.e.,execlp(value, arg(0), arg(1), ...)).")


> On 四月 13, 2016, 10:29 a.m., Alexander Rukletsov wrote:
> > src/cli/execute.cpp, line 341
> > <https://reviews.apache.org/r/44441/diff/7/?file=1342235#file1342235line341>
> >
> >     I'm confused. I thought we've agreed during the offline discussion that we need
to parse command properly and that `tokenize` is error-prone in this case.

After check with Gilbert, I will try to add a new flag named as `arguments` and using JSON
to do the parsing.


- Guangya


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


On 四月 13, 2016, 2:47 a.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44441/
> -----------------------------------------------------------
> 
> (Updated 四月 13, 2016, 2:47 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Gilbert Song, haosdent huang, and Jie
Yu.
> 
> 
> Bugs: MESOS-4882
>     https://issues.apache.org/jira/browse/MESOS-4882
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Treated command as executable value and arguments in mesos-execute.
> 
> 
> Diffs
> -----
> 
>   src/cli/execute.cpp 306779f5227248a9f1d67b6c50854ec47dd59cd5 
> 
> Diff: https://reviews.apache.org/r/44441/diff/
> 
> 
> Testing
> -------
> 
> 1) with docker entry point
> root@mesos002:~/src/mesos/m1/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050
 --name=test_mesos --docker_image=busybox:latest --containerizer=mesos --no-shell
> I0403 21:35:42.949331 12369 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '70abe267-a808-43fa-a1db-512af35d8ad4-0000
> task test_mesos submitted to agent 030ca997-9310-48bb-973f-d53136022537-S0
> Received status update TASK_RUNNING for task test_mesos
> 
> 2) With command 1
> root@mesos002:~/src/mesos/m1/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050
 --name=test_mesos --docker_image=busybox:latest --containerizer=mesos --no-shell  --command="ls,/etc/passwd"
> I0403 21:36:55.703246 12483 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '70abe267-a808-43fa-a1db-512af35d8ad4-0001
> task test_mesos submitted to agent 030ca997-9310-48bb-973f-d53136022537-S0
> Received status update TASK_RUNNING for task test_mesos
> Received status update TASK_FINISHED for task test_mesos
> 
> 3) With command 2
> root@mesos002:~/src/mesos/m1/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050
 --name=test_mesos --docker_image=busybox:latest --containerizer=mesos --no-shell  --command="ls,/etc/passwd,/etc/passwd"
> I0403 21:37:22.901828 12548 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '70abe267-a808-43fa-a1db-512af35d8ad4-0002
> task test_mesos submitted to agent 030ca997-9310-48bb-973f-d53136022537-S0
> Received status update TASK_RUNNING for task test_mesos
> Received status update TASK_FINISHED for task test_mesos
> 
> 4) With command 3
> root@mesos002:~/src/mesos/m1/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050
 --name=test_mesos --docker_image=busybox:latest --containerizer=mesos --no-shell  --command="cat,/etc/passwd,/etc/passwd"
> I0403 21:39:35.986281 12651 scheduler.cpp:172] Version: 0.29.0
> Subscribed with ID '70abe267-a808-43fa-a1db-512af35d8ad4-0003
> task test_mesos submitted to agent 030ca997-9310-48bb-973f-d53136022537-S0
> Received status update TASK_RUNNING for task test_mesos
> Received status update TASK_FINISHED for task test_mesos
> 
> 5) 
> root@mesos002:~/src/mesos/m2/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050
 --name=test_mesos --docker_image=busybox:latest --containerizer=mesos --no-shell  --command="echo,
hello,world"
> I0410 21:09:57.914875 10649 scheduler.cpp:175] Version: 0.29.0
> Subscribed with ID '11a3bd6c-be66-46d6-a5a5-8e9b635940fe-0007
> task test_mesos submitted to agent 7419ec23-763d-441f-b5d4-6d9222a1cfc9-S0
> Received status update TASK_RUNNING for task test_mesos
> Received status update TASK_FINISHED for task test_mesos
> 
> From sandbox stdout:
> [echo, echo,  hello, world]
>  hello world
>  
> 6) root@mesos002:~/src/mesos/m2/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050
 --name=test_mesos --docker_image=busybox:latest --containerizer=mesos --no-shell  --command="echo,
hello world"
> I0410 21:09:53.783275 10581 scheduler.cpp:175] Version: 0.29.0
> Subscribed with ID '11a3bd6c-be66-46d6-a5a5-8e9b635940fe-0006
> task test_mesos submitted to agent 7419ec23-763d-441f-b5d4-6d9222a1cfc9-S0
> Received status update TASK_RUNNING for task test_mesos
> Received status update TASK_FINISHED for task test_mesos
> 
> From sandbox stdout:
> [echo, echo,  hello world]
>  hello world
>  
> 7)root@mesos002:~/src/mesos/m2/mesos/build# ./src/mesos-execute --master=192.168.56.12:5050
 --name=test_mesos --docker_image=busybox:latest --containerizer=mesos --no-shell  --command=""I0413
10:45:13.365993 18037 scheduler.cpp:175] Version: 0.29.0
> Subscribed with ID '0cae04e2-e47a-4297-86c3-e370e95fa350-0001'
> Submitted task 'test_mesos' to agent '0cae04e2-e47a-4297-86c3-e370e95fa350-S0'
> Received status update TASK_RUNNING for task 'test_mesos'
>   source: SOURCE_EXECUTOR
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message