Repository navigation
Always do a canary check during deployment - #3312
Conversation
There was a problem hiding this comment.
What about desiredReplicas 0?
There was a problem hiding this comment.
Good question. The upstream rolling updater rejects desired replicas of 0 as invalid. The pre hook would still execute before we pass it off to the upstream library.
For recreate, we could continue to execute pre/post with 0 desired and just consider the deployment complete, but then the user would get different behavior when using the rolling strategy.
If we're going to allow 0, then we'll need to make a case for changing it upstream as well. Otherwise, we should probably reject 0 for recreate to remain consistent. Can you think of a use case where the user would intend to roll out a deployment with 0 desired?
cc @abhgupta
There was a problem hiding this comment.
On Jun 18, 2015, at 1:56 PM, Dan Mace [email protected] wrote:
In pkg/deploy/strategy/recreate/recreate.go:
@@ -104,10 +104,9 @@ func (s *RecreateDeploymentStrategy) DeployWithAcceptor(from *kapi.ReplicationCo
}
}
- // If an UpdateAcceptor is provided and we're trying to scale up to more
- // than one replica, scale up to 1 and validate the replica, aborting if the
- // replica isn't acceptable.
- if updateAcceptor != nil && desiredReplicas > 1 {
- // If an UpdateAcceptor is provided, scale up to 1 and validate the replica,
- // aborting if the replica isn't acceptable.
- if updateAcceptor != nil {
Good question. The upstream rolling updater rejects desired replicas of 0 as invalid. The pre hook would still execute before we pass it off to the upstream library.For recreate, we could continue to execute pre/post with 0 desired and just consider the deployment complete, but then the user would get different behavior when using the rolling strategy.
If we're going to allow 0, then we'll need to make a case for changing it upstream as well. Otherwise, we should probably reject 0 for recreate to remain consistent. Can you think of a use case where the user would intend to roll out a deployment with 0 desired?
I just want to make sure this code doesn't die if the number is wrong. It should probably tolerate 0 and do the right thing (there is no canary on 0).
cc @abhgupta—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Makes sense. I spruced up the logic to account for zero.
d257520 to
0813737
Compare
|
LGTM, will merge when we reopen the queue. |
|
[test] |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/3404/) |
|
This may have broken the docker registry deployment |
Interesting... I wonder if the default timeout of 120 seconds too aggressive for the registry. |
|
That's really fast - let's bump the timeout up to 10 minutes by default.
|
0813737 to
91e6bd7
Compare
|
Build was stuck for 22 (!) hours... [test] again? |
|
[test] again... another delete-all flake? |
|
Pulling in #3398 temporarily so container logs will be preserved in these flaky test runs. |
|
Yum repo issues... [test] and test again |
|
[test] again, jenkins fixed |
|
Is there an issue o |
|
pen for the registry flake? |
|
Ah ha! |
|
Yuck
|
|
The docker pull of the deployer image seems to be sporadically failing across jobs. [test] |
3f32267 to
91e6bd7
Compare
|
Got a green build, rolled back the #3398 patch. |
|
Is there an issue open with someone assigned to debug it?
|
@ncdc and I are now looking into the devmapper/pull issue which seems to be plaguing the builds. |
|
We figured out the jenkins issue. The fix will be rolled into #3398. I'd like to rebase when that lands. |
|
Not sure I'd go so far as to say we've figured out why devicemapper is failing. But we identified that both test-cmd.sh and test-end-to-end-docker.sh are using the latest released images (e.g. v1.0.0 tag) instead of the locally built images. |
|
Yeah, to be more specific, we seem to be susceptible to possible upstream bugs because we're doing pulls we didn't mean to. |
Always perform canary checking during deployments, regardless of the desired replica count. Increase the default canary timeout to 10 seconds to reduce the possibility of false negative startup canary checks.
91e6bd7 to
791188a
Compare
|
Jenkins should be more stable now... I'm going to see if I can figure out the travis 1.4 errors. |
|
[test] |
3fed4fb to
ce55906
Compare
|
I think this can finally go in. I'm writing off travis for now as too slow/unreliable. |
There was a problem hiding this comment.
Do you need this anymore? Thought this was test only
ce55906 to
791188a
Compare
|
Oops.. thanks. Removed diagnostic code. |
|
LGTM [merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/2576/) (Image: devenv-fedora_1872) |
|
Evaluated for origin up to 791188a |
Merged by openshift-bot
Closes #3308.