{"action":"created","issue":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/4046","repository_url":"https://api.github.com/repos/mesosphere/marathon","labels_url":"https://api.github.com/repos/mesosphere/marathon/issues/4046/labels{/name}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/4046/comments","events_url":"https://api.github.com/repos/mesosphere/marathon/issues/4046/events","html_url":"https://github.com/mesosphere/marathon/issues/4046","id":163117891,"number":4046,"title":"Delete (rollback) deployment is dangerous","user":{"login":"janisz","id":1616386,"avatar_url":"https://avatars.githubusercontent.com/u/1616386?v=3","gravatar_id":"","url":"https://api.github.com/users/janisz","html_url":"https://github.com/janisz","followers_url":"https://api.github.com/users/janisz/followers","following_url":"https://api.github.com/users/janisz/following{/other_user}","gists_url":"https://api.github.com/users/janisz/gists{/gist_id}","starred_url":"https://api.github.com/users/janisz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janisz/subscriptions","organizations_url":"https://api.github.com/users/janisz/orgs","repos_url":"https://api.github.com/users/janisz/repos","events_url":"https://api.github.com/users/janisz/events{/privacy}","received_events_url":"https://api.github.com/users/janisz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-06-30T09:11:38Z","updated_at":"2017-02-14T14:04:09Z","closed_at":null,"body":"Let's consider situation when application is running and is healthy. Let the deployment be scheduled. New version of app cannot be started (for whatever) reason. Then user delete the deployments (by clicking rollback in UI or just sending DELETE on endpoint without force). Let assume that app cannot be redeployed (e.g. artifact is unavailable). After this procedure user end up with 0 running instances!\n\n**Example:**\n1. `resource we can control` is an URL of http server accesible from mesos agents that we can start/stop on demand (e.g. `python -m SimpleHTTPServer` on local machine)\n2. Deploy application\n   \n   ``` json\n   {\n     \"id\": \"/rollbacktest\",\n     \"cmd\": \"sleep 30 && wget <resource we can control> && python -m SimpleHTTPServer $PORT0\",\n     \"cpus\": 0.1,\n     \"mem\": 32,\n     \"disk\": 0,\n     \"instances\": 5,\n     \"healthChecks\": [\n       {\n         \"path\": \"/\",\n         \"protocol\": \"HTTP\",\n         \"portIndex\": 0,\n         \"gracePeriodSeconds\": 5,\n         \"intervalSeconds\": 60,\n         \"timeoutSeconds\": 20,\n         \"maxConsecutiveFailures\": 3,\n         \"ignoreHttp1xx\": false\n       }\n     ],\n     \"portDefinitions\": [\n       {\n         \"port\": 10486,\n         \"protocol\": \"tcp\",\n         \"labels\": {}\n       }\n     ]\n   }\n   ```\n3. Update this application\n   \n   ``` json\n   {\n     \"id\": \"/rollbacktest\",\n     \"cmd\": \"sleep 30 && wget <resource we can control> && fail\",\n     \"cpus\": 0.1,\n     \"mem\": 32,\n     \"disk\": 0,\n     \"instances\": 5,\n     \"healthChecks\": [\n       {\n         \"path\": \"/\",\n         \"protocol\": \"HTTP\",\n         \"portIndex\": 0,\n         \"gracePeriodSeconds\": 5,\n         \"intervalSeconds\": 60,\n         \"timeoutSeconds\": 20,\n         \"maxConsecutiveFailures\": 3,\n         \"ignoreHttp1xx\": false\n       }\n     ],\n     \"portDefinitions\": [\n       {\n         \"port\": 10486,\n         \"protocol\": \"tcp\",\n         \"labels\": {}\n       }\n     ]\n   }\n   ```\n4. Application is failing.\n5. Disable `resource we can control`.\n6. Rollback to previous version.\n7. We end up with 0 running tasks.\n\nIMO when user want to rollback deployment, expected behavior will be to do not restart currently running application if has same version as version we want to rollback. Or behave as normal deployment and take in to account `upgradeStrategy` settings.\n\nReleated to: #1554 \n"},"comment":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/comments/279715017","html_url":"https://github.com/mesosphere/marathon/issues/4046#issuecomment-279715017","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/4046","id":279715017,"user":{"login":"aquamatthias","id":330485,"avatar_url":"https://avatars.githubusercontent.com/u/330485?v=3","gravatar_id":"","url":"https://api.github.com/users/aquamatthias","html_url":"https://github.com/aquamatthias","followers_url":"https://api.github.com/users/aquamatthias/followers","following_url":"https://api.github.com/users/aquamatthias/following{/other_user}","gists_url":"https://api.github.com/users/aquamatthias/gists{/gist_id}","starred_url":"https://api.github.com/users/aquamatthias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquamatthias/subscriptions","organizations_url":"https://api.github.com/users/aquamatthias/orgs","repos_url":"https://api.github.com/users/aquamatthias/repos","events_url":"https://api.github.com/users/aquamatthias/events{/privacy}","received_events_url":"https://api.github.com/users/aquamatthias/received_events","type":"User","site_admin":false},"created_at":"2017-02-14T14:04:08Z","updated_at":"2017-02-14T14:04:08Z","body":"Marathon 1.4 will filter the list of running tasks and only replace tasks that are not already replaced. \r\n@janisz can you try this version?"}}
{"actor":{"display_login":"aquamatthias"}}