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

App IDs ending in /tasks, etc. should be considered invalid

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Won't Do
    • Affects Version/s: Marathon 1.4.3
    • Fix Version/s: None
    • Component/s: API
    • Labels:

      Description

      Our API is set up such that app ID's ending in things that match tasks, restart, versions or versions/... lead to bad behavior.

      pwn3d.json

      {
        "id": "/le-group/tasks",
        "args": ["sh", "-c", "sleep 3601"],
        "container": {
          "type": "DOCKER",
          "docker": {
            "forcePullImage": false,
            "image": "alpine",
            "privileged": false
          }
        },
        "cpus": 0.1,
        "instances": 0,
        "mem": 64
      }
      

      And create it:

      $ cat p4wn3d.json | http POST :2016/v2/apps
      
      HTTP/1.1 201 Created
      Cache-Control: no-cache, no-store, must-revalidate
      Content-Type: application/json; qs=2
      Date: Sat, 06 May 2017 06:57:08 GMT
      Expires: 0
      Location: http://localhost:2016/v2/apps/le-group/tasks
      Marathon-Deployment-Id: c55af223-fd87-42c8-89a4-f3a9f8729609
      Pragma: no-cache
      Transfer-Encoding: chunked
      X-Marathon-Leader: http://Tim-Harper.local:2016
      
      {
          "args": [
              "sh",
              "-c",
              "sleep 3601"
          ],
          "backoffFactor": 1.15,
          "backoffSeconds": 1,
          "container": {
              "docker": {
                  "forcePullImage": false,
                  "image": "alpine",
                  "parameters": [],
                  "privileged": false
              },
              "type": "DOCKER",
              "volumes": []
          },
          "cpus": 0.1,
          "deployments": [
              {
                  "id": "c55af223-fd87-42c8-89a4-f3a9f8729609"
              }
          ],
          "disk": 0,
          "executor": "",
          "gpus": 0,
          "id": "/le-group/tasks",
          "instances": 0,
          "killSelection": "YOUNGEST_FIRST",
          "labels": {},
          "maxLaunchDelaySeconds": 3600,
          "mem": 64,
          "networks": [
              {
                  "mode": "host"
              }
          ],
          "portDefinitions": [
              {
                  "name": "default",
                  "port": 0,
                  "protocol": "tcp"
              }
          ],
          "requirePorts": false,
          "tasks": [],
          "tasksHealthy": 0,
          "tasksRunning": 0,
          "tasksStaged": 0,
          "tasksUnhealthy": 0,
          "unreachableStrategy": {
              "expungeAfterSeconds": 600,
              "inactiveAfterSeconds": 300
          },
          "upgradeStrategy": {
              "maximumOverCapacity": 1,
              "minimumHealthCapacity": 1
          },
          "version": "2017-05-06T06:57:08.051Z"
      }
      

      All is fine and dandy.

      Now try to delete or get it:

      $ http :2016/v2/apps/le-group/tasks | jq .
      {
        "message": "App '/le-group' does not exist"
      }
      
      00:59 $ http DELETE :2016/v2/apps/le-group/tasks
      {
          "message": "App '/le-group' does not exist"
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tharper Tim Harper
                Team:
                Orchestration Team
                Watchers:
                Adam Bordelon (Inactive), Ivan Chernetsky, Tim Harper
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: