Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-8049

UnreachableStrategy Has Inconsistent JSON validation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: DC/OS 1.12.0
    • Component/s: API
    • Labels:
      None

      Description

       

      It is possible to provide "expungeAfterSeconds" alone for the strategy if this is done the "inactiveAfterSeconds" defaults to 0.    However if the "inactiveAfterSeconds" is provided without "expungeAfterSeconds" the JSON isn't valid with the message below

      HTTP 422: "{"message":"Object is not valid","details":[{"path":"/unreachableStrategy/inactiveAfter","errors":["got 10 seconds, expected 0 seconds or less"]}]}".

      Acceptance criteria

      Given a fresh Marathon instance
      When I POST the following JSON to /v2/apps:

      {
        "id": "/sleep",
        "instances": 1,
        "cmd": "sleep 100000000",
        "cpus": 0.01,
        "mem": 32,
        "disk": 0,
        "unreachableStrategy": {
          "inactiveAfterSeconds": 10
        }
      }
      

      Then I receive a validation response

      {"message":"Object is not valid","details":[{"path":"/unreachableStrategy/inactiveAfter","errors":["inactiveAfterSeconds must be less or equal to expungeAfterSeconds which is 0"]}]}
      

        Attachments

          Activity

            People

            • Assignee:
              alenavarkockova Alena Varkockova
              Reporter:
              ken Ken Sipe
              Team:
              Orchestration Team
              Watchers:
              Alena Varkockova, Ken Sipe, Matthias Eichstedt
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: