{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/5875","labels_url":"https://api.github.com/repos/openshift/origin/issues/5875/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/5875/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/5875/events","html_url":"https://github.com/openshift/origin/pull/5875","id":116568160,"number":5875,"title":"Improve deployment scaling behavior","user":{"login":"ironcladlou","id":298299,"avatar_url":"https://avatars.githubusercontent.com/u/298299?v=3","gravatar_id":"","url":"https://api.github.com/users/ironcladlou","html_url":"https://github.com/ironcladlou","followers_url":"https://api.github.com/users/ironcladlou/followers","following_url":"https://api.github.com/users/ironcladlou/following{/other_user}","gists_url":"https://api.github.com/users/ironcladlou/gists{/gist_id}","starred_url":"https://api.github.com/users/ironcladlou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironcladlou/subscriptions","organizations_url":"https://api.github.com/users/ironcladlou/orgs","repos_url":"https://api.github.com/users/ironcladlou/repos","events_url":"https://api.github.com/users/ironcladlou/events{/privacy}","received_events_url":"https://api.github.com/users/ironcladlou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-11-12T15:07:36Z","updated_at":"2015-11-16T14:51:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/5875","html_url":"https://github.com/openshift/origin/pull/5875","diff_url":"https://github.com/openshift/origin/pull/5875.diff","patch_url":"https://github.com/openshift/origin/pull/5875.patch"},"body":"This change makes the DeploymentConfigController solely responsible for scaling RCs owned by a deployment config which aren't currently being manipulated by a deployer process. RCs owned by the deployment config will be reconciled so that the active deployment matches the config replica count and all other RCs are scaled to 0.\r\n\r\nRationale:\r\n\r\n* Prevents races with HPA, users performing manual scaling, the deployer process, and the deployer pod controller (which was also performing scaling operations.)\r\n* Aligns replica count handling with upstream deployments; today, the replica count for deployments follows the last successful deployment and requires users to scale RCs in order to adjust subsequent deployment replica counts. Now, changes to the config replica count will drive new deployments, and scale existing deployments.\r\n* Allows all scaling operations to target the deploymentConfig only rather than RCs.\r\n\r\nThis also adds a variety of new events to provide insight into what the controller is doing.\r\n\r\nFixes #5597\r\n\r\n### TODO\r\n- [x] deployerPodController unit tests\r\n- [ ] update DC scaling subresource to scale the DC directly\r\n- [ ] e2e or extended tests to exercise scaling interactions\r\n- [ ] discussion of https://github.com/openshift/origin/pull/5875#issuecomment-156197377\r\n"},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/157056529","html_url":"https://github.com/openshift/origin/pull/5875#issuecomment-157056529","issue_url":"https://api.github.com/repos/openshift/origin/issues/5875","id":157056529,"user":{"login":"kargakis","id":3900799,"avatar_url":"https://avatars.githubusercontent.com/u/3900799?v=3","gravatar_id":"","url":"https://api.github.com/users/kargakis","html_url":"https://github.com/kargakis","followers_url":"https://api.github.com/users/kargakis/followers","following_url":"https://api.github.com/users/kargakis/following{/other_user}","gists_url":"https://api.github.com/users/kargakis/gists{/gist_id}","starred_url":"https://api.github.com/users/kargakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kargakis/subscriptions","organizations_url":"https://api.github.com/users/kargakis/orgs","repos_url":"https://api.github.com/users/kargakis/repos","events_url":"https://api.github.com/users/kargakis/events{/privacy}","received_events_url":"https://api.github.com/users/kargakis/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T14:51:47Z","updated_at":"2015-11-16T14:51:47Z","body":"Ah, makes sense now. Agreed that a mocked config change would fit here.\n\nOn Mon, Nov 16, 2015 at 3:48 PM, Dan Mace <notifications@github.com> wrote:\n\n> The way this is coded right now, replica counts for failed deployments\n> won't be reconciled until the deployment config controller full resync\n> interval, since there is no update to the deploymentConfig which would\n> trigger a watch event. If that's a problem, we could do something like\n> update an annotation or status of the deploymentConfig when a deployment\n> fails (just some off the cuff examples).\n>\n> If you trigger a fake config change then you would have the config\n> controller be another entrypoint for scaling? I don't like it. I don't like\n> that we have this interval for the dc controller, too:) What is stopping us\n> from having a controller that will do both? Reconciling at intervals and on\n> config changes too?\n>\n> The config controller is still the scaling controller. What I mean is, due\n> to our pod based deployment mechanism, there are times when we want to\n> reconcile the DCs in response to non-DC updates. In this case, when the\n> deployer pod reaches a terminal state, we should reconcile the owning DC.\n> The question is how to trigger that reconcile other than waiting for the\n> resync interval since it's not the DC that changed, but a related resource\n> (the deployer pod).\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/openshift/origin/pull/5875#issuecomment-157055567>.\n>\n"}}