Uploaded image for project: 'DC/OS'
  1. DC/OS
  2. DCOS_OSS-4464

Add support for IS operator in metronome

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: DC/OS 1.12, DC/OS 1.13.0
    • Component/s: metronome
    • Labels:
      None

      Description

      Background

      Metronome has support for constraints, but presents a slightly different API than Marathon. Currently, it supports operators which map to the corresponding marathon operators as follows:

      Metronome operator Marathon operator
      EQ CLUSTER
      LIKE LIKE
      UNLIKE LIKE

      Documentation for Marathon constrained operators can be found here:

      https://mesosphere.github.io/marathon/docs/constraints.html

      Plan

      In order to bring metronome's API into closer alignment with Marathon, we will rename the EQ operator to IS; further, we will map the IS operator to the Marathon operator IS.

      Further, metronome allows a valueless specification of EQ. While this maps to CLUSTER, and this has meaning in Marathon, it is meaningless in the context of jobs and has no effect.

      Acceptance Criteria

      Given a fresh instance of Metronome
      and I post a job with an EQ constraint
      When I read the job back
      Then I should see an IS constraint

      Given an old instance of Metronome
      When I post a job with an EQ constraint
      and then I upgrade Metronome
      and then I read the job back
      Then I should see an IS constraint

      Given an fresh instance of Metronome
      When I post a job with a valueless IS constraint
      Then the constraint should have no effect

        Attachments

          Activity

            People

            • Assignee:
              tharper Tim Harper
              Reporter:
              tharper Tim Harper
              Team:
              Orchestration Team
              Watchers:
              Mergebot, Tim Harper
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: