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 <[email protected]> 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 <[email protected]> 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 <[email protected]> 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 >> > >

