Re: Different reservation roles for resources inside single offer

2018-11-05 Thread Michał Łowicki
On Mon, Nov 5, 2018 at 5:23 AM Benjamin Bannier <
benjamin.bann...@mesosphere.io> wrote:

> Hi Michał,
>
> > Is it guaranteed that reservations' roles for all resources within
> single offer will always be the same? I've tried to with "
> --resources="cpus(foo):1;mem(bar):4096" passed to agent and framework
> having multiple roles (foo and bar) and I'm getting only offers like:
> > * mem(reservations: [(STATIC,bar)]):4096;disk:471782;ports:[31000-32000]
> > * cpus(reservations: [(STATIC,foo)]):1
> > * cpus(reservations: [(STATIC,foo)]):1;disk:471782;ports:[31000-32000]
> >
> > so on my machine I couldn't get an offer where resources have
> reservation role. If this is guaranteed then where I can find any
> information about it in official doc?
> >
> > should be "so on my machine I couldn't get an offer where resources have
> different reservation role"
>
> The answer depends on the role(s) of your framework. In general it is much
> safer to not make strong assumptions here if possible; I’d expect that your
> framework would need to possibly examine the roles of offered resources
> anyway, at least to distinguish unreserved and reserved resources.
>
> * * *
>
> On the technical level, an offer will always only contain resources
> allocated to just a single role, see
> https://github.com/apache/mesos/blob/master/include/mesos/mesos.proto#L1911-L1914.
> In the default hierarchical allocator reserved resources are only
> allocatable to the role they are reserved for or any of its subroles,
> https://github.com/bbannier/mesos/blob/b5d884bba4e5c1550e15df4c3d51c692a985126e/src/common/resources.cpp#L1211-L1212
> .
>
> More practically, if you you register a framework in the hierarchical role
> `foo/bar`, resources reserved for `foo` are allocatable to the framework as
> are resources reserved for `foo/bar`. Here an offer might contain resources
> reserved for `foo` and resources reserved for `foo/bar` at the same time in
> addition to unreserved resources; all these resources would be allocated to
> `foo/bar`.
>
> If your framework is registered to a non-hierarchical role `foo`, any
> offers to it would only contain resources reserved to `foo` or unreserved
> resources, allocated to `foo`.
>

Yup, it helps a lot. Thank you.

>
>
> HTH & cheers,
>
> Benjamin



-- 
BR,
Michał Łowicki


Re: Welcome Meng Zhu as PMC member and committer!

2018-11-05 Thread Benno Evers
Congratulations, Meng!

On Thu, Nov 1, 2018 at 9:54 AM Yan Xu  wrote:

> Congratulations!
>
>
> On Wed, Oct 31, 2018 at 4:50 PM Vinod Kone  wrote:
>
>> Congrats Meng!
>>
>> Thanks,
>> Vinod
>>
>> > On Oct 31, 2018, at 4:26 PM, Gilbert Song 
>> wrote:
>> >
>> > Well deserved, Meng!
>> >
>> >> On Wed, Oct 31, 2018 at 2:36 PM Benjamin Mahler 
>> wrote:
>> >> Please join me in welcoming Meng Zhu as a PMC member and committer!
>> >>
>> >> Meng has been active in the project for almost a year and has been
>> very productive and collaborative. He is now one of the few people of
>> understands the allocator code well, as well as the roadmap for this area
>> of the project. He has also found and fixed bugs, and helped users in slack.
>> >>
>> >> Thanks for all your work so far Meng, I'm looking forward to more of
>> your contributions in the project.
>> >>
>> >> Ben
>>
>

-- 
Benno Evers
Software Engineer, Mesosphere