-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
round 2 #2
round 2 #2
Conversation
Duration time.Duration | ||
//when this value is passed | ||
//Value is the number at which, after the duration is passed, this threshold is considered to be triggered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the units of 'Value'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Value is always considered a float in this case. My assumption is that all stats boil down to a number that can be compared against.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be more specific in the answer, I don't think that we care what the units are and that we leave it up to the statistics gather mechanism to publish how it stores stats (ms vs seconds, etc) and up to the user to define the correct value that matches the units.
3be5b8f
to
4f4472c
Compare
@smarterclayton please review prior to me merging into the main PR to make sure I'm on track with the feedback. Thanks. |
of multiple replication controllers and check that capacity against the `AutoScalerSpec.MaxAutoScaleCount` and | ||
`AutoScalerSpec.MinAutoScaleCount` while still only targeting a specific `ReplicationController`. | ||
|
||
In the course of a rolling update it would be up to the deployment orchestration to re-target the auto-scaler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be somewhat problematic - how do you know which auto-scalers target you? How do you transactionally guarantee that? It also means every component that creates and manipulates replication controllers also has to know about auto-scalers. That's not necessarily a blocking issue, but it does create complexity when it comes to meaning. It's possible that the deployment process itself is the thing that should be taking the target of the autoscaler (via the resize verb), rather than the underlying individual replication controllers. In the OpenShift case, we have a deployment target (the deployment config) which can support resize. In the current Kube code, kubectl has no target, so it would have to talk to the controller instead.
It seems like the deployer really needs a way to communicate to the autoscaler that is tied to the replication controllers directly. If you had that, you could mark the replication controllers semantically as you went through a deployment. However, that has some issues too.
Basically, kubectl having to know about auto-scalers to do its job feels wrong. We need to establish whether it's impossible to keep kubectl isolated from the auto-scaler, or whether we just need a better abstraction (some combination of a marker on the RC + the autoscaler selector).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so I think I've digested this. My thoughts are, we can solve the issue of knowing what autoscalers target a resizeable object by adding a registration component to the interface. When an autoscaler is initialized it can attempt to register itself with its target.
Transactionally guaranteeing the state of "which scalers target me" seems harder. Since autoscalers can be updated by external components (api calls and deployments) I don't think we can guarantee that the scalers registered to component A are still targeting component A at any point in time.
We could, perhaps, separate the decision making of the autoscaler from something that calls the resize verb. In that use case, the autoscaler would take two object references, one for the expected target of the resize (the replication controller) and one for the resizer object. Any action the autoscaler wants to take for the target produces an event with the semantics "resizer A: take action B on target C". If resizer A no longer targets target C the event is dropped.
We essentially end up with a big circle of communication in the case of 'hey replication controller D, retarget your auto scalers to E'. Repl controller D iterates through its registered autoscalers and calls a method that emits an event of "resizer A: take retarget action, target E if you currently target C". This design implies that operations within the resizer must be atomic.
Finally, I'm not sure where kubectl comes in to play. The use case that stands out to me (which is not currently called out in the proposal) is a scenario where manual changing of the replication controller conflicts with the autoscaler and how policy deals with that. Can you elaborate on what you were thinking there?
/cc @pmorie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Feb 11, 2015, at 5:43 PM, Paul [email protected] wrote:
In docs/proposals/autoscaling.md:
@@ -197,6 +178,34 @@ resolves to a value that can be checked against a configured threshold.
Of note: If the statistics gathering mechanisms can be initialized with a registry other components storing statistics can
potentially piggyback on this registry.+### Interactions with a deployment
+
+In a deployment it is likely that multiple replication controllers must be monitored. For instance, in a rolling deployment
+there will be multiple replication controllers, with one scaling up and another scaling down. This means that an
+auto-scaler must be aware of the entire set of capacity that backs a service so it does not fight with the deployer.AutoScalerSpec.Selector
+is what provides this ability. By using a selector that spans the entire service the auto-scaler can monitor capacity
+of multiple replication controllers and check that capacity against theAutoScalerSpec.MaxAutoScaleCount
and
+AutoScalerSpec.MinAutoScaleCount
while still only targeting a specificReplicationController
.
+
+In the course of a rolling update it would be up to the deployment orchestration to re-target the auto-scaler.
Ok, so I think I've digested this. My thoughts are, we can solve the issue of knowing what autoscalers target a resizeable object by adding a registration component to the interface. When an autoscaler is initialized it can attempt to register itself with its target.Transactionally guaranteeing the state of "which scalers target me" seems harder. Since autoscalers can be updated by external components (api calls and deployments) I don't think we can guarantee that the scalers registered to component A are still targeting component A at any point in time.
We could, perhaps, separate the decision making of the autoscaler from something that calls the resize verb. In that use case, the autoscaler would take two object references, one for the expected target of the resize (the replication controller) and one for the resizer object. Any action the autoscaler wants to take for the target produces an event with the semantics "resizer A: take action B on target C". If resizer A no longer targets target C the event is dropped.
We essentially end up with a big circle of communication in the case of 'hey replication controller D, retarget your auto scalers to E'. Repl controller D iterates through its registered autoscalers and calls a method that emits an event of "resizer A: take retarget action, target E if you currently target C". This design implies that operations within the resizer must be atomic.
The two references is reasonable. For deployment configs, we don't have a problem (one target, which hides the fact there are multiple items). For rolling update of rcs, the target has to remain fixed, but maybe we allow the count to be done via selector. Then it's the rolling updates responsibility to handle swapping out the target. I.e the rolling updater first creates a copy of the current rc, but with no label selector and size 0. Then it clears the label
Selector of the existing one (or disables it somehow) and updates the old one to have the right pattern. We may not have the primitives we need though.
We need to be having this discussion on the existing pull - can you update and summarize this thread?
Finally, I'm not sure where kubectl comes in to play. The use case that stands out to me (which is not currently called out in the proposal) is a scenario where manual changing of the replication controller conflicts with the autoscaler and how policy deals with that. Can you elaborate on what you were thinking there?
/cc @pmorie
—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do, thanks for the initial feedback
closed, adding to main proposal |
Automatic merge from submit-queue in each pd test, create and delete the pod for every iteration to give new pod name for exec fix kubernetes#26141 based on chat with @ncdc The following is a snapshot of the log. Each iteration now has a new Pod name ```text [It] should schedule a pod w/two RW PDs both mounted to one container, write to PD, verify contents, delete pod, recreate pod, verify contents, and repeat in rapid succession [Slow] [Flaky] /srv/dev/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/pd.go:277 STEP: creating PD1 Jun 10 15:55:45.878: INFO: Successfully created a new PD: "rootfs-e2e-c8b82df9-2f23-11e6-a5a0-b8ca3a62792c". STEP: creating PD2 Jun 10 15:55:49.794: INFO: Successfully created a new PD: "rootfs-e2e-cb135362-2f23-11e6-a5a0-b8ca3a62792c". Jun 10 15:55:49.794: INFO: PD Read/Writer Iteration #0 STEP: submitting host0Pod to kubernetes W0610 15:55:49.860308 17282 request.go:347] Field selector: v1 - pods - metadata.name - pd-test-cd68f34b-2f23-11e6-a5a0-b8ca3a62792c: need to check if this is versioned correctly. STEP: writing a file in the container Jun 10 15:56:09.792: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-cd68f34b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- /bin/sh -c echo '988876932586416926' > '/testpd1/tracker0'' Jun 10 15:56:12.003: INFO: Wrote value: "988876932586416926" to PD1 ("rootfs-e2e-c8b82df9-2f23-11e6-a5a0-b8ca3a62792c") from pod "pd-test-cd68f34b-2f23-11e6-a5a0-b8ca3a62792c" container "mycontainer" STEP: writing a file in the container Jun 10 15:56:12.003: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-cd68f34b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- /bin/sh -c echo '8414937992264649637' > '/testpd2/tracker0'' Jun 10 15:56:13.170: INFO: Wrote value: "8414937992264649637" to PD2 ("rootfs-e2e-cb135362-2f23-11e6-a5a0-b8ca3a62792c") from pod "pd-test-cd68f34b-2f23-11e6-a5a0-b8ca3a62792c" container "mycontainer" STEP: reading a file in the container Jun 10 15:56:13.170: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-cd68f34b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker0' Jun 10 15:56:14.325: INFO: Read file "/testpd1/tracker0" with content: 988876932586416926 STEP: reading a file in the container Jun 10 15:56:14.325: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-cd68f34b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker0' Jun 10 15:56:15.590: INFO: Read file "/testpd2/tracker0" with content: 8414937992264649637 STEP: deleting host0Pod Jun 10 15:56:15.841: INFO: PD Read/Writer Iteration #1 STEP: submitting host0Pod to kubernetes W0610 15:56:15.905485 17282 request.go:347] Field selector: v1 - pods - metadata.name - pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c: need to check if this is versioned correctly. STEP: reading a file in the container Jun 10 15:56:16.832: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker0' Jun 10 15:56:18.132: INFO: Read file "/testpd1/tracker0" with content: 988876932586416926 STEP: reading a file in the container Jun 10 15:56:18.132: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker0' Jun 10 15:56:19.354: INFO: Read file "/testpd2/tracker0" with content: 8414937992264649637 STEP: writing a file in the container Jun 10 15:56:19.354: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- /bin/sh -c echo '7639503234625274799' > '/testpd1/tracker1'' Jun 10 15:56:20.526: INFO: Wrote value: "7639503234625274799" to PD1 ("rootfs-e2e-c8b82df9-2f23-11e6-a5a0-b8ca3a62792c") from pod "pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c" container "mycontainer" STEP: writing a file in the container Jun 10 15:56:20.526: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- /bin/sh -c echo '7400445987108171911' > '/testpd2/tracker1'' Jun 10 15:56:21.694: INFO: Wrote value: "7400445987108171911" to PD2 ("rootfs-e2e-cb135362-2f23-11e6-a5a0-b8ca3a62792c") from pod "pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c" container "mycontainer" STEP: reading a file in the container Jun 10 15:56:21.694: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker0' Jun 10 15:56:22.904: INFO: Read file "/testpd1/tracker0" with content: 988876932586416926 STEP: reading a file in the container Jun 10 15:56:22.905: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker0' Jun 10 15:56:24.080: INFO: Read file "/testpd2/tracker0" with content: 8414937992264649637 STEP: reading a file in the container Jun 10 15:56:24.081: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker1' Jun 10 15:56:25.290: INFO: Read file "/testpd1/tracker1" with content: 7639503234625274799 STEP: reading a file in the container Jun 10 15:56:25.290: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-dcef71e1-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker1' Jun 10 15:56:26.491: INFO: Read file "/testpd2/tracker1" with content: 7400445987108171911 STEP: deleting host0Pod Jun 10 15:56:26.756: INFO: PD Read/Writer Iteration #2 STEP: submitting host0Pod to kubernetes W0610 15:56:26.821828 17282 request.go:347] Field selector: v1 - pods - metadata.name - pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c: need to check if this is versioned correctly. STEP: reading a file in the container Jun 10 15:56:27.898: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker1' Jun 10 15:56:29.096: INFO: Read file "/testpd1/tracker1" with content: 7639503234625274799 STEP: reading a file in the container Jun 10 15:56:29.096: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker1' Jun 10 15:56:30.325: INFO: Read file "/testpd2/tracker1" with content: 7400445987108171911 STEP: reading a file in the container Jun 10 15:56:30.325: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker0' Jun 10 15:56:31.528: INFO: Read file "/testpd1/tracker0" with content: 988876932586416926 STEP: reading a file in the container Jun 10 15:56:31.529: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker0' Jun 10 15:56:32.972: INFO: Read file "/testpd2/tracker0" with content: 8414937992264649637 STEP: writing a file in the container Jun 10 15:56:32.972: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- /bin/sh -c echo '1846555975530999997' > '/testpd1/tracker2'' Jun 10 15:56:34.157: INFO: Wrote value: "1846555975530999997" to PD1 ("rootfs-e2e-c8b82df9-2f23-11e6-a5a0-b8ca3a62792c") from pod "pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c" container "mycontainer" STEP: writing a file in the container Jun 10 15:56:34.157: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- /bin/sh -c echo '2775947264799611726' > '/testpd2/tracker2'' Jun 10 15:56:35.661: INFO: Wrote value: "2775947264799611726" to PD2 ("rootfs-e2e-cb135362-2f23-11e6-a5a0-b8ca3a62792c") from pod "pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c" container "mycontainer" STEP: reading a file in the container Jun 10 15:56:35.662: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker0' Jun 10 15:56:36.868: INFO: Read file "/testpd1/tracker0" with content: 988876932586416926 STEP: reading a file in the container Jun 10 15:56:36.868: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker0' Jun 10 15:56:38.062: INFO: Read file "/testpd2/tracker0" with content: 8414937992264649637 STEP: reading a file in the container Jun 10 15:56:38.062: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker1' Jun 10 15:56:39.221: INFO: Read file "/testpd1/tracker1" with content: 7639503234625274799 STEP: reading a file in the container Jun 10 15:56:39.221: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker1' Jun 10 15:56:40.397: INFO: Read file "/testpd2/tracker1" with content: 7400445987108171911 STEP: reading a file in the container Jun 10 15:56:40.397: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd1/tracker2' Jun 10 15:56:41.584: INFO: Read file "/testpd1/tracker2" with content: 1846555975530999997 STEP: reading a file in the container Jun 10 15:56:41.585: INFO: Running '/srv/dev/kubernetes/_output/local/bin/linux/amd64/kubectl exec --namespace=e2e-tests-pod-disks-2tvm2 pd-test-e370dd2b-2f23-11e6-a5a0-b8ca3a62792c -c=mycontainer -- cat /testpd2/tracker2' Jun 10 15:56:42.800: INFO: Read file "/testpd2/tracker2" with content: 2775947264799611726 STEP: deleting host0Pod ``` @saad-ali
We should not bailout when we get an error. We should continue processing other files/directories. We were returning the err passed in which was causing the processing to stop. Fixes kubernetes#30377
Automatic merge from submit-queue Fix TestPidOf {procfs} - Take #2 We should not bailout when we get an error. We should continue processing other files/directories. We were returning the err passed in which was causing the processing to stop. Fixes kubernetes#30377
No description provided.