Repository navigation
Rolling updater enhancements - #3701
Conversation
1591ca1 to
454ed77
Compare
|
Did you regenerate conversions too? |
There was a problem hiding this comment.
This should have fail unit tests. No json on internal types
There was a problem hiding this comment.
What unit test should have failed it? They're passing.
There was a problem hiding this comment.
What unit test should have failed it? They're passing.
454ed77 to
ae1a2e7
Compare
There was a problem hiding this comment.
Why don't we break here? We're going to check only one pod, but claim we know about all of the pods?
There was a problem hiding this comment.
Yes: we need to keep track of all pods known for the controller so the next time we do verification we don't re-check a pod from the previous set.
|
I wasn't involved the initial review of this item. This pull looks like minor fitting of an existing feature for upstream refactoring. The fitting looks pretty reasonable, but I think you'll need to get to the original reviewer to sign off. Could you also link me to the original pull? |
|
@Kargakis can review this in more depth. |
|
@smarterclayton I'd also like you to review the UpdateAcceptor implementation change to make sure it aligns with the new semantics (to verify on every interval). |
|
We need to have a way to set the internal to either be "up first" or "down first". So scaling old down by X percent first, then scaling new up by Y. This is required for us to support scale in place when # replicas = available target nodes. |
There was a problem hiding this comment.
You are missing 1 and 100 here. So
(*params.UpdatePercent <= 1 || *params.UpdatePercent >= 100)There was a problem hiding this comment.
But 1 and 100 are valid values...
There was a problem hiding this comment.
Nvmd, it was early in the morning.
|
A validation fix and nits |
d5bba7d to
e67dea0
Compare
This needs to be a followup issue. |
e67dea0 to
0571a7a
Compare
|
[test] |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/3707/) |
|
Why? On Jul 15, 2015, at 9:00 AM, Dan Mace [email protected] wrote: @smarterclayton https://github.com/smarterclayton We need to have a way to set the internal to either be "up first" or "down This needs to be a followup issue. — |
Because that's a fundamental and orthogonal change to the upstream mechanism that we hadn't previously discussed. The way we designed the current UpdateAcceptor patch we're carrying is "only accept once regardless of the interval count," then during the tunables work the requirements changed to "accept every interval," which led to me having to refactor the acceptor implementation as you see here. Now we're getting into even more unanticipated design discussion about the newly refactored update acceptor which I hadn't even intended to change for the tunables issue in the first place. I'm already pretty uncomfortable rolling the UpdateAcceptor and tunables work together. I don't want to introduce a third change which really could be made separately after we've got some agreement on the preceding designs on which it would be based. |
0571a7a to
d8485fd
Compare
|
Delivering features that don't quite work doesn't help us. Can you tell me On Wed, Jul 15, 2015 at 10:52 AM, Dan Mace [email protected] wrote:
Clayton Coleman | Lead Engineer, OpenShift |
|
Is there some prior reference to the scale down then up requirement? Sounds like we need a new issue and card to take priority over this one. |
|
I would just make -% alter the order (down before up) On Wed, Jul 15, 2015 at 11:24 AM, Dan Mace [email protected] wrote:
Clayton Coleman | Lead Engineer, OpenShift |
There was a problem hiding this comment.
I really wanted to emit progress at V(0) but I'm not sure of a great/all-purpose way to rate limit the output when the interval is short. Thoughts?
There was a problem hiding this comment.
We should spawn a follow up on the usability of output. Let's get this
closedz
On Jul 21, 2015, at 9:11 AM, Dan Mace [email protected] wrote:
In pkg/deploy/strategy/support/lifecycle.go
#3701 (comment):
return true, nil } // Otherwise, try again later.
glog.V(4).Infof("Still waiting for pod %s/%s container readiness; observed statuses: #%v", pod.Namespace, pod.Name, observedContainers)glog.V(4).Infof("Still waiting for %d of %s pods to become ready for deployment %s", len(observedPodContainers), unreadyPods, unreadyContainers, deployutil.LabelForDeployment(deployment))
I really wanted to emit progress at V(0) but I'm not sure of a
great/all-purpose way to rate limit the output when the interval is short.
Thoughts?
—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/3701/files#r35099349.
So imagine this scenario: Since the full percent increment will always be scaled down to the SLA threshold right before scale up/acceptance, I don't yet an alternative to waiting for all of the newly scaled-up pods to be ready. If we don't fully replace the scaled-down chunk from the start of the interval, we risk dipping below the SLA by our unready pods racing with the next interval's scale-down. |
|
What if we altered the scale interval to account for unready? I don't want to fail a 100 pod deploy because a node is bad. Which is what On Jul 21, 2015, at 10:02 AM, Dan Mace [email protected] wrote: Thought experiment - for us to complete a deployment, 100-N% pods have to So imagine this scenario: UpdatePercent: -10% i old new ready(old+new) 0 100 0 100 Since the full percent increment will always be scaled down to the SLA — |
I don't follow... elaborate more on that idea?
Yeah. Still having trouble imagining how to solve it. To deconstruct the "node death" case further: if the node dies but the pods can still be scheduled elsewhere, there's no problem (other than the time counted against the timeout). If the node death means we can't schedule some of the pods for an interval, what recourse do we have? We can't predict if a future interval will fill in the gap if we were to ignore it, so we have to assume that the current interval is our only chance to keep us above the line. Maybe whatever you had in mind for scale alteration above relates to this. |
|
On Jul 21, 2015, at 10:30 AM, Dan Mace [email protected] wrote: What if we altered the scale interval to account for unready? I don't follow... elaborate more on that idea? I don't want to fail a 100 pod deploy because a node is bad. Which is what Yeah. Still having trouble imagining how to solve it. To deconstruct the Treat update percent as the max scale interval. Only scale down to the So if you have +10%, scale up, wait until pods are ready, scaled down Basically, don't scale by fixed chunks. Scaled based on how many are ready. — |
I'm pretty sure this is all clear to me now and seems workable. Unfortunately, now we're back to...
The upstream code would need re-designed with this in mind. It would need to take on the responsibility of checking overall readiness each interval to recompute the scaling increment, or rely on the update acceptor to give it new values (or context to inform the computation), or something else. |
|
Let's finish this out and treat at as a next step. What we have here is On Jul 21, 2015, at 10:56 AM, Dan Mace [email protected] wrote: Treat update percent as the max scale interval. Only scale down to the SLA. I'm pretty sure this is all clear to me now and seems workable. How hard is that to implement? The upstream code would need re-designed with this in mind. It would need — |
de165d8 to
2ff3b16
Compare
|
I drastically simplified the acceptor implementation based on your suggestion to use |
|
"One failure breaks the deploy" which is incredibly fragile for any deployment over 5 or 10 pods. Follow? Probability of independent failures grows independently. |
There was a problem hiding this comment.
This will check all pods every time right? Do we want that or we just want to check a pod once and then never check it again?
There was a problem hiding this comment.
If the latter, make this
if !c.acceptedPods.Has(pod) && kapi.IsPodReady(pod) {There was a problem hiding this comment.
I think the latter. But you can't scale down if one of your new ones goes
down without breaching SLA.
On Jul 21, 2015, at 12:09 PM, Michail Kargakis [email protected]
wrote:
In pkg/deploy/strategy/support/lifecycle.go
#3701 (comment):
continue }
// The status of the container could be transient; we only care if it// was ever ready. If it was ready and then became not ready, we// consider it ready.if status.Ready {observedContainers[status.Name] = true}}// Check whether all containers have been observed as ready.allReady := truefor _, ready := range observedContainers {if !ready {allReady = falsebreakif kapi.IsPodReady(pod) {
If the latter, make this
if c.acceptedPods.Has(pod) && kapi.IsPodReady(pod) {
—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/3701/files#r35120393.
There was a problem hiding this comment.
It's not equivalent. Still have to account for if the pod wasn't in accepted pods and is unready to insert it into the unready set. I don't think that would be any more clear or less code. It's already compact.
The current code doesn't perfom a readiness check on previously accepted pods.
I think the logic I have is correct.
There was a problem hiding this comment.
Oh I missed your check above
Yes. |
|
You and I can chat on that after we land this. I think this is LGTM but On Jul 21, 2015, at 1:16 PM, Dan Mace [email protected] wrote: "One failure breaks the deploy" which is incredibly fragile for any Yes. — |
2ff3b16 to
20be192
Compare
Integrate with upstream rolling update enhancements. * Tweak the update acceptor to support being invoked on every update interval for a deployment. * Update rolling params API to support updatePercent passed through to the upstream rolling updater.
20be192 to
1e89ad0
Compare
|
This is LGTM [merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/3707/) (Image: devenv-fedora_2045) |
|
Evaluated for origin up to 1e89ad0 |
Merged by openshift-bot
|
Link the next issue here please On Wed, Jul 22, 2015 at 1:44 PM, OpenShift Bot [email protected]
Clayton Coleman | Lead Engineer, OpenShift |
|
Created #3844 as a followup. |
Integrate with upstream rolling update enhancements.
interval for a deployment.
to the upstream rolling updater.
Integrates deployments with kubernetes/kubernetes#10062.
Closes #2828.
Fixes #3313.