mesos-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wenzhao Zhang <wzhan...@ncsu.edu>
Subject Re: Specify requested resource when running a docker app
Date Thu, 13 Jul 2017 12:47:46 GMT
Thanks everyone for the help.
--resources="cpus:2;mem:512"   is the correct way to go.

Wenzhao


On Wed, Jul 12, 2017 at 10:24 PM, Chun-Hung Hsiao <chhsiao@mesosphere.io>
wrote:

> In your original command, the shell sees you typed in two commands: one
> before the semicolon, and one after it.
> The shell will execute them in sequence, and that's why only the first
> resource requirement is applied, since only the first one is included in
> the command.
>
> The backquotes in Jen's reply is just used to quote the parameters you
> want to put in the command line. Don't add backquotes themselves!
> Otherwise the shell would try to run the command  [
> --resource="cpus:2;mem:256" ], which is an invalid command so it would
> return a null string,
> and print "command not found" in the standard error stream; then, the
> shell plugs the null string into your command, and that's why it's ignored.
>
> On Wed, Jul 12, 2017 at 5:25 PM, Qian Zhang <zhq527725@gmail.com> wrote:
>
>> You need to put cpus:2;mem:256 into double quote, like
>> --resources="cpus:2;mem:256", I tried it with the latest Mesos code, it
>> works well.
>>
>>
>> Regards,
>> Qian Zhang
>>
>> On Wed, Jul 12, 2017 at 11:49 PM, Wenzhao Zhang <wzhang27@ncsu.edu>
>> wrote:
>>
>>> Hi, Jan:
>>>
>>> I've tried `--resources="cpus:2;mem:256"`,   but in this way, it seems
>>> that Mesos ignores the input entirely,  it just uses the default option (
>>> cpus:1;mem:128).
>>>
>>> Thanks
>>>
>>> On Wed, Jul 12, 2017 at 10:27 AM, Jan Schlicht <jan@mesosphere.io>
>>> wrote:
>>>
>>>> Do you use quotes when specifying the resources? I.e.
>>>> `--resources="cpus:2;mem:256"`? If you don't, the semicolon will be
>>>> treated as a command separator.
>>>>
>>>> On Wed, Jul 12, 2017 at 3:21 PM, Wenzhao Zhang <wzhang27@ncsu.edu>
>>>> wrote:
>>>>
>>>>> Hello, All:
>>>>>
>>>>> I have a problem of explicitly specify needed request when running a
>>>>> docker app over Apache Mesos.
>>>>>
>>>>> if I run,
>>>>> mesos-execute --master=XXX --containerizer=docker --name=XXX
>>>>> --docker_image=XXX --shell=false
>>>>> I understand it defaults to add --resources=cpus:1;mem:128.
>>>>>
>>>>> But if I explicitly add something like,  --resources=cpus:2;mem:256,
>>>>> or --resources=mem:512;cpus:2,  only the first resource is accepted by
the
>>>>> mesos-execute,  e.g for  "cpus:2;mem:256"  only "cpus" info is parsed
by
>>>>> Mesos,
>>>>> the remaining resources are ignored.
>>>>>
>>>>> It looks like a bug. But I'm not sure of how to bypass it. Could
>>>>> anyone help me out?
>>>>> I'm working on Mesos1.2
>>>>>
>>>>> Thanks very much
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Jan Schlicht*
>>>> Distributed Systems Engineer, Mesosphere
>>>>
>>>
>>>
>>
>

Mime
View raw message