mesosphere / marathon

Deploy and manage containers (including Docker) on top of Apache Mesos at scale.
https://mesosphere.github.io/marathon/
Apache License 2.0
4.07k stars 845 forks source link

tried to kill an existing app, said it doesn't exist even though it does #3251

Closed tamarrow-zz closed 8 years ago

tamarrow-zz commented 8 years ago

Created an app:

$ cat tests/data/marathon/apps/zero_instance_sleep.json
{
  "id": "zero-instance-app",
  "cmd": "sleep 1000",
  "cpus": 0.1,
  "mem": 16,
  "instances": 0,
  "dependencies": ["/product/database", "../backend"],
  "labels": {
    "PACKAGE_ID": "zero-instance-app",
    "PACKAGE_VERSION": "1.2.3"
  }
}
$http POST http://52.35.15.246/marathon/v2/apps @tests/data/marathon/apps/zero_instance_sleep.json
HTTP/1.1 201 Created

Tried to kill the app but got:

$ http DELETE http://52.35.15.246/marathon/v2/apps/zero-instance-app/tasks
HTTP/1.1 404 Not Found
Cache-Control: no-cache, no-store, must-revalidate
Connection: keep-alive
Content-Type: application/json; qs=2
Date: Wed, 17 Feb 2016 00:20:12 GMT
Expires: 0
Pragma: no-cache
Server: openresty/1.7.10.2
Transfer-Encoding: chunked
X-Marathon-Leader: http://10.0.4.224:8080

{
    "message": "App '/zero-instance-app' does not exist"
}

But the app does still exist according to marathon..

$ http GET http://52.35.15.246/marathon/v2/apps/zero-instance-app
HTTP/1.1 200 OK
philipnrmn commented 8 years ago

Deleted an earlier response where I misread the ticket. Reproduced this issue.

aquamatthias commented 8 years ago

Hey @tamarrow you do not try to kill an existing app, you try to kill all tasks of an existing app. Since there is no task of that app, you get a 404. I agree the error message is obviously misleading - no tasks for that app would probably be better.

aquamatthias commented 8 years ago

But I realized, previous versions had that behavior. Will fix this.