{"action":"created","issue":{"url":"https://api.github.com/repos/coreos/fleet/issues/1023","repository_url":"https://api.github.com/repos/coreos/fleet","labels_url":"https://api.github.com/repos/coreos/fleet/issues/1023/labels{/name}","comments_url":"https://api.github.com/repos/coreos/fleet/issues/1023/comments","events_url":"https://api.github.com/repos/coreos/fleet/issues/1023/events","html_url":"https://github.com/coreos/fleet/issues/1023","id":48272971,"number":1023,"title":"fleet rebalancing feature","user":{"login":"rimusz","id":5215395,"avatar_url":"https://avatars.githubusercontent.com/u/5215395?v=3","gravatar_id":"","url":"https://api.github.com/users/rimusz","html_url":"https://github.com/rimusz","followers_url":"https://api.github.com/users/rimusz/followers","following_url":"https://api.github.com/users/rimusz/following{/other_user}","gists_url":"https://api.github.com/users/rimusz/gists{/gist_id}","starred_url":"https://api.github.com/users/rimusz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimusz/subscriptions","organizations_url":"https://api.github.com/users/rimusz/orgs","repos_url":"https://api.github.com/users/rimusz/repos","events_url":"https://api.github.com/users/rimusz/events{/privacy}","received_events_url":"https://api.github.com/users/rimusz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/coreos/fleet/labels/kind/enhancement","name":"kind/enhancement","color":"c7def8"},{"url":"https://api.github.com/repos/coreos/fleet/labels/kind/question","name":"kind/question","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-11-10T15:02:02Z","updated_at":"2016-03-25T15:32:35Z","closed_at":null,"body":"As per our discussion on https://groups.google.com/forum/#!topic/coreos-user/2TMksA4tMfQ\r\n\r\nCurrently fleet nicely balances units around cluster machines only for:\r\n1) new fresh installed cluster \r\n2) adding new units to the current cluster\r\n\r\nThe problem is if one of node gets reboot e.g. an update or we get a new node in the cluster, units do not get rebalanced back around all the nodes.\r\n\r\nI would suggest to have a simple rebalancing  for the fleet.\r\n1) Rebooted/new node pings fleet - I'm here give me some job :) \r\n2) fleet calculates all units which can be rebalanced, counts them, checks cluster nodes number and \r\nrandomly picks units and rebalances them. (the same procedure you use for deploying new units should be fine there)\r\n\r\ne.g.\r\n3 x nodes cluster with 20 units which can work on any node.\r\n1) 1 node gets rebooted for the upgrade.\r\n2) 20/3=6.66 round it to 7\r\n3) random 7 units get rebalanced on the rebooted/new node.\r\n\r\nCPU, RAM usage and etc should not be counted in, we do not want to complicated things too much :)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/coreos/fleet/issues/comments/201333954","html_url":"https://github.com/coreos/fleet/issues/1023#issuecomment-201333954","issue_url":"https://api.github.com/repos/coreos/fleet/issues/1023","id":201333954,"user":{"login":"joeatwork","id":106866,"avatar_url":"https://avatars.githubusercontent.com/u/106866?v=3","gravatar_id":"","url":"https://api.github.com/users/joeatwork","html_url":"https://github.com/joeatwork","followers_url":"https://api.github.com/users/joeatwork/followers","following_url":"https://api.github.com/users/joeatwork/following{/other_user}","gists_url":"https://api.github.com/users/joeatwork/gists{/gist_id}","starred_url":"https://api.github.com/users/joeatwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joeatwork/subscriptions","organizations_url":"https://api.github.com/users/joeatwork/orgs","repos_url":"https://api.github.com/users/joeatwork/repos","events_url":"https://api.github.com/users/joeatwork/events{/privacy}","received_events_url":"https://api.github.com/users/joeatwork/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T15:32:35Z","updated_at":"2016-03-25T15:32:35Z","body":"Could this be the kind of thing that could be handled by an external client of fleet rather than needing built-in support? That way questions like \"should fleet ignore scheduled CoreOS reboots\" could be handled site by site?"}}