{"action":"created","issue":{"url":"https://api.github.com/repos/tsuru/tsuru/issues/1441","repository_url":"https://api.github.com/repos/tsuru/tsuru","labels_url":"https://api.github.com/repos/tsuru/tsuru/issues/1441/labels{/name}","comments_url":"https://api.github.com/repos/tsuru/tsuru/issues/1441/comments","events_url":"https://api.github.com/repos/tsuru/tsuru/issues/1441/events","html_url":"https://github.com/tsuru/tsuru/pull/1441","id":171556792,"number":1441,"title":"app/deploy: reject images that are not valid for rollback","user":{"login":"fsouza","id":108725,"avatar_url":"https://avatars.githubusercontent.com/u/108725?v=3","gravatar_id":"","url":"https://api.github.com/users/fsouza","html_url":"https://github.com/fsouza","followers_url":"https://api.github.com/users/fsouza/followers","following_url":"https://api.github.com/users/fsouza/following{/other_user}","gists_url":"https://api.github.com/users/fsouza/gists{/gist_id}","starred_url":"https://api.github.com/users/fsouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsouza/subscriptions","organizations_url":"https://api.github.com/users/fsouza/orgs","repos_url":"https://api.github.com/users/fsouza/repos","events_url":"https://api.github.com/users/fsouza/events{/privacy}","received_events_url":"https://api.github.com/users/fsouza/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-17T01:49:51Z","updated_at":"2016-08-17T03:22:43Z","closed_at":"2016-08-17T03:22:37Z","pull_request":{"url":"https://api.github.com/repos/tsuru/tsuru/pulls/1441","html_url":"https://github.com/tsuru/tsuru/pull/1441","diff_url":"https://github.com/tsuru/tsuru/pull/1441.diff","patch_url":"https://github.com/tsuru/tsuru/pull/1441.patch"},"body":"Tsuru accepts any value as a parameter to app-deploy-rollback, and you won't believe what happens next:\r\n\r\n```\r\n% tsuru app-deploy-rollback app-deploy-rollback --app test-chico\r\nAre you sure you want to rollback app \"test-chico\" to image \"app-deploy-rollback\"? (y/n) y\r\n\r\n---- Starting 0 new units  ----\r\n\r\n---- Binding and checking 0 new units ----\r\n\r\n---- Setting router healthcheck (Path: /) ----\r\n\r\n---- Removing routes from old units ----\r\n ---> Removed route from unit b7df34b7b8 [web]\r\n\r\n---- Removing 1 old unit ----\r\n ---> Removed old unit b7df34b7b8 [web]\r\n\r\n---- Unbinding 1 old unit ----\r\n ---> Removed bind for old unit b7df34b7b8 [web]\r\n% tsuru app-deploy-list -a test-chico\r\n+-------------------------+----------+--------+-------------------------+-------+\r\n| Image (Rollback)        | Origin   | User   | Date (Duration)         | Error |\r\n+-------------------------+----------+--------+-------------------------+-------+\r\n| app-deploy-rollback (*) | rollback | fsouza | Aug 16 10:48:32 (00:02) |       |\r\n+-------------------------+----------+--------+-------------------------+-------+\r\n| v40 (*)                 | rollback | fsouza | Aug 16 10:42:55 (00:04) |       |\r\n+-------------------------+----------+--------+-------------------------+-------+\r\n| v41 (*)                 |          | fsouza | Aug 16 10:28:33 (00:34) |       |\r\n+-------------------------+----------+--------+-------------------------+-------+\r\n% tsuru app-restart -a test-chico\r\n---- Restarting the app \"test-chico\" ----\r\n\r\n---- Starting 0 new units  ----\r\n\r\n---- Binding and checking 0 new units ----\r\n\r\n---- Setting router healthcheck (Path: /) ----\r\n\r\n---- Removing 0 old units ----\r\n\r\n---- Unbinding 0 old units ----\r\n% tsuru unit-add -a test-chico 1\r\n\r\n---- Starting 1 new unit [: 1] ----\r\n\r\n**** ROLLING BACK AFTER FAILURE ****\r\n ---> CreateContainer: maximum number of tries exceeded, last error: error in docker node \"http://server1:2375\" running command \"createContainer\": no such image <---\r\nError: CreateContainer: maximum number of tries exceeded, last error: error in docker node \"http://server2:2375\" running command \"createContainer\": no such image\r\n```\r\n\r\nThe change in this PR fixes this issue."},"comment":{"url":"https://api.github.com/repos/tsuru/tsuru/issues/comments/240303573","html_url":"https://github.com/tsuru/tsuru/pull/1441#issuecomment-240303573","issue_url":"https://api.github.com/repos/tsuru/tsuru/issues/1441","id":240303573,"user":{"login":"andrewsmedina","id":52241,"avatar_url":"https://avatars.githubusercontent.com/u/52241?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewsmedina","html_url":"https://github.com/andrewsmedina","followers_url":"https://api.github.com/users/andrewsmedina/followers","following_url":"https://api.github.com/users/andrewsmedina/following{/other_user}","gists_url":"https://api.github.com/users/andrewsmedina/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewsmedina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewsmedina/subscriptions","organizations_url":"https://api.github.com/users/andrewsmedina/orgs","repos_url":"https://api.github.com/users/andrewsmedina/repos","events_url":"https://api.github.com/users/andrewsmedina/events{/privacy}","received_events_url":"https://api.github.com/users/andrewsmedina/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T03:22:43Z","updated_at":"2016-08-17T03:22:43Z","body":"@fsouza thank you!"}}
{"actor":{"display_login":"andrewsmedina"}}