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

Error while creating/starting an apps group

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      I am trying to run following application group via Marathon REST API. Where redis service depends on the memcached service but If I create and start this application group it raises an error.

      JSON Input file

      {
          "id": "/",
          "groups": [
              {
                  "id": "/depapp",
                  "apps": [
                      {
                          "id": "/depapp/memcache",
                          "cmd": "memcached -m 64 -u suyash",
                          "instances": 1,
                          "cpus": 0.1,
                          "mem": 64,
                          "disk": 0,
                          "healthChecks": [
                              {
                                  "command": { "value": "echo stats | nc localhost 11211" },
                                  "gracePeriodSeconds": 5,
                                  "intervalSeconds": 10,
                                  "maxConsecutiveFailures": 3,
                                  "protocol": "COMMAND",
                                  "timeoutSeconds": 10
                              }
                          ]
                      },
                      {
                          "id": "/depapp/redis",
                          "cmd": "redis-server",
                          "instances": 1,
                          "cpus": 0.1,
                          "mem": 256,
                          "disk": 10,
                          "dependencies": [ "/depapp/memcache" ],
                          "healthChecks": [
                              {
                                  "command": { "value": "redis-cli ping" },
                                  "gracePeriodSeconds": 5,
                                  "intervalSeconds": 10,
                                  "maxConsecutiveFailures": 3,
                                  "protocol": "COMMAND",
                                  "timeoutSeconds": 10
                              }
                          ]
                      }
                  ]
              }
          ]
      }
      

      Error Stack

      $ curl -X POST -H "Content-type: application/json" ubuntu205:8080/v2/apps -d@DepApp3.json 2>/dev/null | python -m json.tool
      {
          "details": [
              {
                  "errors": [],
                  "path": "/id"
              }
          ],
          "message": "Invalid JSON"
      }
      
      $ curl -X PUT -H "Content-type: application/json" ubuntu205:8080/v2/apps -d@DepApp3.json 2>/dev/null | python -m json.tool
      {
          "details": [
              {
                  "errors": [
                      "error.expected.jsarray"
                  ],
                  "path": ""
              }
          ],
          "message": "Invalid JSON"
      }
      

      I have verified the correctness of above JSON file:

      $ cat DepApp3.json | python -m json.tool >/dev/null; echo $?
      0
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                GitHub_gsuyashs Suyash Singh (Inactive)
                Team:
                Orchestration Team
                Watchers:
                Jason Gilanfarr (Inactive)
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: