{"action":"created","issue":{"url":"https://api.github.com/repos/fabfuel/ecs-deploy/issues/12","repository_url":"https://api.github.com/repos/fabfuel/ecs-deploy","labels_url":"https://api.github.com/repos/fabfuel/ecs-deploy/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/fabfuel/ecs-deploy/issues/12/comments","events_url":"https://api.github.com/repos/fabfuel/ecs-deploy/issues/12/events","html_url":"https://github.com/fabfuel/ecs-deploy/issues/12","id":199913576,"number":12,"title":"Stopping service tasks with inactive task definitions.","user":{"login":"joaoricardo000","id":2717047,"avatar_url":"https://avatars.githubusercontent.com/u/2717047?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoricardo000","html_url":"https://github.com/joaoricardo000","followers_url":"https://api.github.com/users/joaoricardo000/followers","following_url":"https://api.github.com/users/joaoricardo000/following{/other_user}","gists_url":"https://api.github.com/users/joaoricardo000/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoricardo000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoricardo000/subscriptions","organizations_url":"https://api.github.com/users/joaoricardo000/orgs","repos_url":"https://api.github.com/users/joaoricardo000/repos","events_url":"https://api.github.com/users/joaoricardo000/events{/privacy}","received_events_url":"https://api.github.com/users/joaoricardo000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-10T19:36:22Z","updated_at":"2017-01-11T06:26:49Z","closed_at":null,"body":"Hi!\r\nI'm having an issue when using the ecs deploy on CircleCI.\r\n\r\nAfter the whole process (create new task def, update service), it freezes on the \"Deploying task definition\".\r\n```\r\necs deploy $AWS_CLUSTER $AWS_SERVICE -t $AWS_TAG_DEV\r\nUpdating task definition\r\nChanged image of container 'xxxxx-frontend' to: \"1234.dkr.ecr.us-west-2.amazonaws.com/xxxxx/frontend:dev\" (was: \"1234.dkr.ecr.us-west-2.amazonaws.com/xxxxx/frontend:dev\")\r\n\r\nCreating new task definition revision\r\nSuccessfully created revision: 10\r\nSuccessfully deregistered revision: 9\r\n\r\nUpdating service\r\nSuccessfully changed task definition to: xxxxx-frontend:10\r\n\r\nDeploying task definition...................................................\r\n```  \r\n  \r\nChecking the AWS Console, I can see that the new task is running, with the new task definition - but the old one is not stopped and the desired status is still 'running'.\r\nIf I manually stop the old task, the \"Deploying task definition\" unfreezes and the process finishes with success.  The desired status is 1 task for this service, so checking your code I can see that the [stop task](http://docs.aws.amazon.com/cli/latest/reference/ecs/stop-task.html) is never called for the old one.  \r\n  \r\nAm I missing something? Is this an error of configuration on ECS?\r\n\r\nThanks for the project!"},"comment":{"url":"https://api.github.com/repos/fabfuel/ecs-deploy/issues/comments/271789030","html_url":"https://github.com/fabfuel/ecs-deploy/issues/12#issuecomment-271789030","issue_url":"https://api.github.com/repos/fabfuel/ecs-deploy/issues/12","id":271789030,"user":{"login":"fabfuel","id":1582291,"avatar_url":"https://avatars.githubusercontent.com/u/1582291?v=3","gravatar_id":"","url":"https://api.github.com/users/fabfuel","html_url":"https://github.com/fabfuel","followers_url":"https://api.github.com/users/fabfuel/followers","following_url":"https://api.github.com/users/fabfuel/following{/other_user}","gists_url":"https://api.github.com/users/fabfuel/gists{/gist_id}","starred_url":"https://api.github.com/users/fabfuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabfuel/subscriptions","organizations_url":"https://api.github.com/users/fabfuel/orgs","repos_url":"https://api.github.com/users/fabfuel/repos","events_url":"https://api.github.com/users/fabfuel/events{/privacy}","received_events_url":"https://api.github.com/users/fabfuel/received_events","type":"User","site_admin":false},"created_at":"2017-01-11T06:26:49Z","updated_at":"2017-01-11T06:26:49Z","body":"Hi @joaoricardo000! \r\nDoes the same thing happen, if you run this locally and not in CircleCI?\r\n\r\nActually this tool never calls `start` or `stop task`. It's just creating a new task definition and updating a service with this new task revision. The actual deployment and task management happens completely on AWS side.\r\n\r\nIt's strange that it freezes, because this is just a loop, which checks periodically if the service has deployed the new task revision and is running in a steady state.\r\n\r\nDuring your deployment, can you see two entries in the `Deployments` tab on the service's page in the AWS console?\r\n\r\nWhat are the service's deployment options `Minimum healthy percent` and `Maximum percent`?\r\n\r\nDo you see any events in the `Events` tab on the service page?\r\n\r\nBest\r\nFabian"}}
{"actor":{"display_login":"fabfuel"}}