Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-6628

Add a FrameworkInfo.roles field along with a MULTI_ROLE capability.

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: scheduler api
    • Labels:
      None

      Description

      In order to support frameworks having multiple roles, we will introduce a FrameworkInfo.roles field as a repeated string.

      Note that because we cannot distinguish between an empty set of roles (new-style framework wanting no roles) and an unset role (old-style framework wanting the "*" role), we must introduce a framework capability (i.e. MULTI_ROLE). This capability will be required for a framework to use the new roles field.

      message FrameworkInfo {
        ...
      
        // Roles are the entities to which allocations are made.
        // The framework must have at least one role in order to
        // be offered resources. Note that `role` is deprecated
        // in favor of `roles` and only one of these fields must
        // be used. Since we cannot distinguish between empty
        // `roles` and the default unset `role`, we require that
        // frameworks set the `MULTI_ROLE` capability if
        // setting the `roles` field.
        optional string role = 6 [default="*", deprecated=true];
        repeated string roles = 12;
      
        message Capability {
          enum Type {
            ...
      
            // This expresses the ability for the framework to be
            // "multi-tenant" via using the newly introduced `roles`
            // field, and examining `Offer.allocation_info` to determine
            // which role the offers are being made to. We also
            // expect that "single-tenant" schedulers eventually
            // provide this and  move away from the deprecated
            // `role` field.
            MULTI_ROLE = 3;
          }
      
          optional Type type = 1;
        }
      
        ...
      }
      

      Validation will be added in MESOS-6629 and we will prevent roles from being modified in MESOS-6631.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                guoger Jay Guo
                Reporter:
                bmahler Benjamin Mahler
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: