I am reviving this thread as I am looking to do something similar but have
a question

 --resources="cpus(role1):1;mem(role1):2048;disk(role1):32768;cpus(*):11"

In what Vinod has put works, but in reality I want (assuming a 12 vcore and
32768 MB of ram node)

 --resources="cpus(role1):1;mem(role1):2048;cpus(*):12;mem(*):32768"

In other words, role1 is allowed to use 1 CPU and 2 GB of memory on this
node.  All other roles are allowed to use the 12 CPUs and 32 GB of ram (all
the node's resources). However, Mesos is adding these, thus the slave is
registering thinking it has 13 available cores,  the desired behavior is
that dev is allowed to use a core if one is available on this node, and
production is allowed to use 12 cores if available. If Prod is using 12
cores, then obviously, the dev task needing one core won't run here, if
prod is using 11 cores, then a dev task using 1 core will be able to run.
How would I achieve that using the the --resources flag?

Thanks!




On Fri, Jun 19, 2015 at 2:31 PM, Vinod Kone <[email protected]> wrote:

>
> On Fri, Jun 19, 2015 at 12:08 PM, Anindya Sinha <[email protected]>
> wrote:
>
>> On mesos-slave: I start mesos-slave with resources carved out for role1
>> as:
>>   --resources="cpus(role1):1;mem(role1):2048;disk(role1):32768"
>>
>
> You need to add "*" (unreserved) resources to this flag. Assuming you have
> 12 cpus on this box it would look like
>
>  --resources="cpus(role1):1;mem(role1):2048;disk(role1):32768;cpus(*):11"
>

Reply via email to