Vincent,

role in a "consumed" resource can be "*", but the allocator will account
this resource based on the consumer's role.

In other words, if your Marathon is registered in role "prod", all "*"
resources it consumes will be accounted for "prod" role. Hence yes, you can
let everything unreserved and wDRF will do exactly what you expect: splits
resource offers between "foo" and "bar" roles according to their weights.

On Thu, Sep 8, 2016 at 5:12 PM, Greg Mann <[email protected]> wrote:

> Vincent,
> You are correct in thinking that you can use weights to affect the
> allocation of resources between frameworks in different roles. While Mesos
> will adjust the offers it sends to frameworks based on their role's
> weighted share, it does not reserve resources in order to accomplish this.
> A resource reservation is created by an operator or framework, not by Mesos
> on its own. Reserved resources are only offered to the role for which they
> are reserved, and they remain reserved until the operator/framework
> unreserves them. Reservations are useful to ensure that specific resources
> will not be used by frameworks outside of a single role.
>
> So, by using weights and roles you can affect how offers will be sent to
> your frameworks, but the resources in those offers will not be reserved
> unless you or one of your frameworks explicitly reserves them itself.
>
> The documentation on roles also has some useful information: http://mesos.
> apache.org/documentation/latest/roles/
>
> Cheers,
> Greg
>
>
>
> On Wed, Sep 7, 2016 at 10:29 PM, vincent gromakowski <
> [email protected]> wrote:
>
>> Tx
>> If I understand I cannot use the weights to dynamically affect resources
>> among 2 different roles ? I thought I could let everything unreserved (role
>> *) and the DRF would use the weights to assign those unreserved resources
>> to roles "foo" and "bar" ?
>>
>> 2016-09-08 6:19 GMT+02:00 Greg Mann <[email protected]>:
>>
>>> Hi Vincent,
>>>
>>>  Can you confirm it's because I didn't set any static reservation ?
>>>>
>>>
>>> Yes, that's correct.
>>>
>>> So how could I check the resource allocation with multiple marathon
>>>> instances and roles, and configured weights between these roles ? Is
>>>> Marathon supposed to reserve resources with the role it's configured to ?
>>>> If yes how can I check ?
>>>>
>>>
>>> No, as far as I know, Marathon doesn't automatically reserve any
>>> resources for its role. The '--mesos_role' flag only sets the role that
>>> Marathon will use when registering with the Mesos master. This means that
>>> it will receive offers reserved for that role, but the resource
>>> reservations must be made separately. You could reserve the resources
>>> statically via your agent configuration, or you could use the operator HTTP
>>> API to accomplish this with dynamic reservations: see the section on
>>> operator HTTP endpoints in the reservation docs.
>>>
>>> Let me know if you have any other questions. It's also possible that I'm
>>> unaware of some Marathon feature that could be helpful here - you could
>>> also check the Marathon docs and reach out on their mailing list or IRC.
>>>
>>> Cheers,
>>> Greg
>>>
>>>
>>
>

Reply via email to