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

dcos marathon group add creates nested group

    Details

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

      Description

      Marathon fails to reject invalid group IDs when posted to the group creation endpoint. Instead, it has surprising behavior in which it creates a nested group, as seen below:

      $ echo '{"id": "lol"}'  | http :8080/v2/groups
      
      {
          "deploymentId": "2785105c-5e91-4204-b14a-44b31401b4b7",
          "version": "2018-02-07T05:18:14.741Z"
      }
      
      $ http :8080/v2/groups
      
      {
          "apps": [],
          "dependencies": [],
          "groups": [
              {
                  "apps": [],
                  "dependencies": [],
                  "groups": [
                      {
                          "apps": [],
                          "dependencies": [],
                          "groups": [],
                          "id": "/lol/lol",
                          "pods": [],
                          "version": "2018-02-07T05:18:14.741Z"
                      }
                  ],
                  "id": "/lol",
                  "pods": [],
                  "version": "2018-02-07T05:18:14.741Z"
              }
          ],
          "id": "/",
          "pods": [],
          "version": "2018-02-07T05:18:14.741Z"
      }
      

      Expected behavior: we should create groups with relative PathIds in the root, not in a rootified version of itself.

      ====

      Original message:

      Run the following command.
      Expected: group 123 to be empty
      Result: group 123 contains group 123

      cat <<EOF | dcos marathon group add
      {
        "id": "123"
      }
      EOF
      

      Adding two slashes fixes the issue

      cat <<EOF | dcos marathon group add
      {
        "id": "//123"
      }
      EOF
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: