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

Unable to remove an application if it is in a subgroup named "tasks"

    Details

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

      Description

      Background

      When using Marathon 1.1.1, if I create a group named myfolder, then a subgroup named tasks, and then launch an application in this subfolder, Marathon is unable to remove this app.

      Are you sure you want to destroy /myfolder/tasks/nginx? This action is irreversible.
      
      Error destroying /myfolder/tasks/nginx: App '/myfolder' does not exist
      

      This error is probably caused by the Marathon API call {{/v2/apps/

      {app_id}/tasks/{task_id}}} which shadows the call {{/v2/apps/{app_id}

      /tasks}}. Indeed, the {{

      {app_id}

      }} parameter is /myfolder/tasks/nginx here.

      Workaround

      A workaround is to remove the folder itself using the v2/groups endpoint.

      Proposed solution

      We should greedily match existing app names, as was done by the (now deleted) akka http path matching directive:

      https://github.com/mesosphere/marathon/commit/524ff90a3580b1b4d0fd1c820b027ad444a3b39f#diff-4cb9414db85fe337dbd6049873dc046bL115

      Acceptance Criteria

      Given a fresh version of Marathon
      When I post the following app definition:

      {"id": "/sleeper/tasks/sleeper", "cmd": "sleep 3600", "instances": 0, "cpus": 0.05, "mem": 128}
      

      And then I DELETE /v2/apps/sleeper/tasks/sleeper
      Then the app /sleeper/tasks/sleeper is deleted

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              GitHub_Devatoria Joris Bonnefoy (Inactive)
              Team:
              Orchestration Team
              Watchers:
              Aleksey Dukhovniy, Jason Gilanfarr (Inactive), Tim Harper
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: