{"action":"created","issue":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/130","labels_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/130/comments","events_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/130/events","html_url":"https://github.com/aws/amazon-ecs-agent/issues/130","id":92498568,"number":130,"title":"Functionality to remove one or many container instance(s) that runs tasks without service interuption","user":{"login":"nexus49","id":52737,"avatar_url":"https://avatars.githubusercontent.com/u/52737?v=3","gravatar_id":"","url":"https://api.github.com/users/nexus49","html_url":"https://github.com/nexus49","followers_url":"https://api.github.com/users/nexus49/followers","following_url":"https://api.github.com/users/nexus49/following{/other_user}","gists_url":"https://api.github.com/users/nexus49/gists{/gist_id}","starred_url":"https://api.github.com/users/nexus49/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nexus49/subscriptions","organizations_url":"https://api.github.com/users/nexus49/orgs","repos_url":"https://api.github.com/users/nexus49/repos","events_url":"https://api.github.com/users/nexus49/events{/privacy}","received_events_url":"https://api.github.com/users/nexus49/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/labels/feature%20request","name":"feature request","color":"209daa"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-07-01T22:27:40Z","updated_at":"2015-10-20T20:59:22Z","closed_at":null,"body":"Hi, \r\ncurrently there does not seem to be a way to remove a container instance that runs tasks from a cluster without downtime without a number of steps that have to happen manually to accomplish the same goal. \r\n\r\nIt would be really helpful if one could mark a container instance as to be deregistered and ecs would take care of reorganizing the tasks first to other nodes before taking the container instance out of the cluster. \r\n\r\nPlease let me know if i missed something and there is already a way. \r\n\r\nManually you'd have to do:\r\n* start task that is running on node x on another node\r\n* wait for that task to be up and registered to the load balancer\r\n* remove instance from load balancer and drain connections\r\n* stop task on node x\r\n* deregister container instance from cluster or terminate the instance directly\r\n\r\nSometimes you just want to replace all nodes in your cluster because the ecs/docker versions changed or some other change that you want to roll out without service interruption. \r\n\r\nCheers\r\n"},"comment":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/comments/149701300","html_url":"https://github.com/aws/amazon-ecs-agent/issues/130#issuecomment-149701300","issue_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/130","id":149701300,"user":{"login":"jhmartin","id":367824,"avatar_url":"https://avatars.githubusercontent.com/u/367824?v=3","gravatar_id":"","url":"https://api.github.com/users/jhmartin","html_url":"https://github.com/jhmartin","followers_url":"https://api.github.com/users/jhmartin/followers","following_url":"https://api.github.com/users/jhmartin/following{/other_user}","gists_url":"https://api.github.com/users/jhmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/jhmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhmartin/subscriptions","organizations_url":"https://api.github.com/users/jhmartin/orgs","repos_url":"https://api.github.com/users/jhmartin/repos","events_url":"https://api.github.com/users/jhmartin/events{/privacy}","received_events_url":"https://api.github.com/users/jhmartin/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T20:59:22Z","updated_at":"2015-10-20T20:59:22Z","body":"+1, especially if it integrates with EC2 Autoscale Lifecycle hooks so that a node that is terminating has an opportunity to gracefully drain tasks away."}}