{"action":"created","issue":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/560","repository_url":"https://api.github.com/repos/aws/amazon-ecs-agent","labels_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/560/labels{/name}","comments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/560/comments","events_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/560/events","html_url":"https://github.com/aws/amazon-ecs-agent/pull/560","id":182650588,"number":560,"title":"Bugfix: Handle known StopContainer errors","user":{"login":"aaithal","id":1183359,"avatar_url":"https://avatars.githubusercontent.com/u/1183359?v=3","gravatar_id":"","url":"https://api.github.com/users/aaithal","html_url":"https://github.com/aaithal","followers_url":"https://api.github.com/users/aaithal/followers","following_url":"https://api.github.com/users/aaithal/following{/other_user}","gists_url":"https://api.github.com/users/aaithal/gists{/gist_id}","starred_url":"https://api.github.com/users/aaithal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaithal/subscriptions","organizations_url":"https://api.github.com/users/aaithal/orgs","repos_url":"https://api.github.com/users/aaithal/repos","events_url":"https://api.github.com/users/aaithal/events{/privacy}","received_events_url":"https://api.github.com/users/aaithal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-12T22:31:48Z","updated_at":"2016-10-17T17:28:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/pulls/560","html_url":"https://github.com/aws/amazon-ecs-agent/pull/560","diff_url":"https://github.com/aws/amazon-ecs-agent/pull/560.diff","patch_url":"https://github.com/aws/amazon-ecs-agent/pull/560.patch"},"body":"<!--\r\nPlease make sure you've read and understood our contributing guidelines;\r\nhttps://github.com/aws/amazon-ecs-agent/blob/master/CONTRIBUTING.md\r\n\r\nPlease provide the following information:\r\n-->\r\n\r\n### Summary\r\n<!-- What does this pull request do? -->\r\nThe Task Engine silently consumes all error from StopContainer API except\r\nthe time out error. Modify this so that only known non-retriable errors\r\nare silently consumed and force reconciliation for other error types.\r\n\r\n\r\n### Implementation details\r\n<!-- How are the changes implemented? -->\r\nThe Task Engine silently consumes all error from StopContainer API except\r\nthe time out error. Modify this so that only known non-retriable errors\r\nare silently consumed and force reconciliation for other error types.\r\n\r\nThese errors include:\r\n1. Container Not Running\r\n2. Unknwon Container ID\r\n3. Docker State Errors from Inspect (Example: invalid command in container\r\n   config)\r\n\r\nThis should fix the bug where the transient StopContainer errors result\r\nin the Task being prematurely marked as STOPPED.\r\n\r\n### Testing\r\n<!-- How was this tested? -->\r\n<!--\r\nNote for external contributors:\r\n`make short-test` and `make test` can run anywhere in a development environment\r\nlike your laptop.  Please ensure both of these pass before opening the pull\r\nrequest.  `make run-functional-tests` must be run on an EC2 instance with an\r\ninstance profile allowing it access to AWS resources.  Running\r\n`make run-functional-tests` may incur charges to your AWS account; if you're\r\nunable or unwilling to run these tests in your own account, we can run the tests\r\nand provide test results.\r\n-->\r\n- [X] Builds (`make release`)\r\n- [X] Unit tests (`make short-test`) pass\r\n- [X] Integration tests (`make test` and `make run-integ-tests`) pass\r\n- [X] Functional tests (`make run-functional-tests`) pass\r\n\r\nNew tests cover the changes: yes\r\n\r\n### Description for the changelog\r\n<!--\r\nWrite a short (one line) summary that describes the changes in this\r\npull request for inclusion in the changelog.\r\nYou can see our changelog entry style here:\r\nhttps://github.com/aws/amazon-ecs-agent/commit/c9aefebc2b3007f09468f651f6308136bd7b384f\r\n-->\r\nBug - Resolved a bug where a Task could prematurely transition to STOPPED\r\n### Licensing\r\n<!--\r\nPlease confirm that this contribution is under the terms of the Apache 2.0\r\nLicense.\r\n-->\r\nThis contribution is under the terms of the Apache 2.0 License: yes\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/comments/254275383","html_url":"https://github.com/aws/amazon-ecs-agent/pull/560#issuecomment-254275383","issue_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/560","id":254275383,"user":{"login":"aaithal","id":1183359,"avatar_url":"https://avatars.githubusercontent.com/u/1183359?v=3","gravatar_id":"","url":"https://api.github.com/users/aaithal","html_url":"https://github.com/aaithal","followers_url":"https://api.github.com/users/aaithal/followers","following_url":"https://api.github.com/users/aaithal/following{/other_user}","gists_url":"https://api.github.com/users/aaithal/gists{/gist_id}","starred_url":"https://api.github.com/users/aaithal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaithal/subscriptions","organizations_url":"https://api.github.com/users/aaithal/orgs","repos_url":"https://api.github.com/users/aaithal/repos","events_url":"https://api.github.com/users/aaithal/events{/privacy}","received_events_url":"https://api.github.com/users/aaithal/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T17:28:16Z","updated_at":"2016-10-17T17:28:16Z","body":"@kiranmeduri its tricky to make docker emit transient errors while stopping containers. Any particular scenario that you had in mind of this?"}}
{"actor":{"display_login":"aaithal"}}