mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Park (JIRA)" <>
Subject [jira] [Commented] (MESOS-7655) Reservation Refinement: Update the resources logic.
Date Mon, 19 Jun 2017 03:13:00 GMT


Michael Park commented on MESOS-7655:

commit cf96042ecf4f294723882ed5dfda9d12e63d6519
Author: Michael Park <>
Date:   Sun Jun 18 18:21:09 2017 -0700

    Avoided exposing `role` in JSON for resources with refined reservations.

    With reservation refinement, we use the `Resource.reservations` field to
    express the reservation state. Due to the fact that `Resource.role` is
    an optional field __and__ has a default value, our generic Protobuf to
    JSON code injects the `role` field with the default value even if it's
    not set. Since this will likely confuse users, here we manually remove
    the `Resource.role` field if the resource has refined reservations.

commit f39f846160ff934e42294ace2662eee2a8f658fb
Author: Michael Park <>
Date:   Sat Jun 17 15:11:12 2017 -0700

    Introduced `convertResourceFormat` to convert between resource formats.

    With reservation refinement, we introduced a new resource format to
    enable creating a refined reservation on top of an existing reservation.
    We still have the "pre-reservation-refinement" format which uses
    the `Resource.role` and `Resource.reservation` fields, and we now also
    have the "post-reservation-refinement" format which uses
    the `Resource.reservations` field to represent the reservation state.

    In order to simplify our code, we use `convertResourceFormat` to
    canonicalize the resources into the "post-reservation-refinement" in
    memory, and convert them back as necessary.

commit 5124602beca53dea153781167121aaaedb30291e
Author: Michael Park <>
Date:   Sat Jun 17 21:03:30 2017 -0700

    Introduced a utility function `Resources::hasRefinedReservations`.

commit 49e090dbb8ab1b7be9dc59cf31a4a26e337c9304
Author: Michael Park <>
Date:   Sat Jun 17 20:47:20 2017 -0700

    Updated the resources validation logic to allow for the endpoint format.

    For backwards compatibility of external tools consuming endpoints,
    We'll inject the "pre-reservation-refinement" format for resources
    without refined reservations. That is, the `Resource.role` and
    `Resource.reservation` fields will be present as well as
    the in with the single `Resource.reservations` field.

    Since the users of the endpoints are likely to feed the result back into
    Mesos, we need to update the validation logic to allow these resources
    to be considered valid.


> Reservation Refinement: Update the resources logic.
> ---------------------------------------------------
>                 Key: MESOS-7655
>                 URL:
>             Project: Mesos
>          Issue Type: Bug
>            Reporter: Michael Park
>            Assignee: Michael Park
> With reservation refinement, there is a new framework capability called {{RESERVATION_REFINEMENT}}.
The framework is required to use the {{Resource.reservations}} field to express reservations
if the capability is set, otherwise it is required to use the {{Resource.role}} and {{Resource.reservation}}
> After the validation, we transform the resources from the old format to the new format
and deal with the new format internally.
> This allows us to only deal with the old format at the validation phase, and update the
code to only consider the new format for all other Resources-related functions.

This message was sent by Atlassian JIRA

View raw message