{"action":"created","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/2558","labels_url":"https://api.github.com/repos/rancher/rancher/issues/2558/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/2558/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/2558/events","html_url":"https://github.com/rancher/rancher/issues/2558","id":115299276,"number":2558,"title":"Rebalancing service containers across hosts","user":{"login":"gordontyler","id":13695544,"avatar_url":"https://avatars.githubusercontent.com/u/13695544?v=3","gravatar_id":"","url":"https://api.github.com/users/gordontyler","html_url":"https://github.com/gordontyler","followers_url":"https://api.github.com/users/gordontyler/followers","following_url":"https://api.github.com/users/gordontyler/following{/other_user}","gists_url":"https://api.github.com/users/gordontyler/gists{/gist_id}","starred_url":"https://api.github.com/users/gordontyler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gordontyler/subscriptions","organizations_url":"https://api.github.com/users/gordontyler/orgs","repos_url":"https://api.github.com/users/gordontyler/repos","events_url":"https://api.github.com/users/gordontyler/events{/privacy}","received_events_url":"https://api.github.com/users/gordontyler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-05T14:48:42Z","updated_at":"2015-11-05T15:52:56Z","closed_at":null,"body":"Say for example that I have N hosts and a number of containers running on those hosts. Initially, the load was fine, but it has subsequently increased and I'm facing resouce constraints on these hosts. I need to add more hosts to my system and reassign existing containers to these new hosts.\r\n\r\nIn the case of stateless containers, this should be fairly easy -- destroy existing containers and recreate them on the new hosts.\r\n\r\nIt's harder in the case of stateful containers, but a stop, export, remove, load, start sequence would probably work, although I'm not sure how volumes would factor into that.\r\n\r\nIt would super awesome if Rancher could handle at least the stateless container case for me. Something like an action for a service or a stack maybe to \"rebalance\" the containers across available hosts."},"comment":{"url":"https://api.github.com/repos/rancher/rancher/issues/comments/154100488","html_url":"https://github.com/rancher/rancher/issues/2558#issuecomment-154100488","issue_url":"https://api.github.com/repos/rancher/rancher/issues/2558","id":154100488,"user":{"login":"gordontyler","id":13695544,"avatar_url":"https://avatars.githubusercontent.com/u/13695544?v=3","gravatar_id":"","url":"https://api.github.com/users/gordontyler","html_url":"https://github.com/gordontyler","followers_url":"https://api.github.com/users/gordontyler/followers","following_url":"https://api.github.com/users/gordontyler/following{/other_user}","gists_url":"https://api.github.com/users/gordontyler/gists{/gist_id}","starred_url":"https://api.github.com/users/gordontyler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gordontyler/subscriptions","organizations_url":"https://api.github.com/users/gordontyler/orgs","repos_url":"https://api.github.com/users/gordontyler/repos","events_url":"https://api.github.com/users/gordontyler/events{/privacy}","received_events_url":"https://api.github.com/users/gordontyler/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T15:52:56Z","updated_at":"2015-11-05T15:52:56Z","body":"So far I've done it by deleting and recreating the services from compose files. This is only possible because they're stateless.\r\n\r\nWhen disabling a host, Rancher already seems to recreate its containers on other hosts."}}