Skip to content

Always do a canary check during deployment - #3312

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
ironcladlou:always-canary
Jun 25, 2015
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
ironcladlou:always-canary

Conversation

@ironcladlou

Copy link
Copy Markdown
Contributor

Closes #3308.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about desiredReplicas 0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I spruced up the logic to account for zero.

@smarterclayton

Copy link
Copy Markdown
Contributor

LGTM, will merge when we reopen the queue.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

[test]

@openshift-bot

Copy link
Copy Markdown
Contributor

@smarterclayton

Copy link
Copy Markdown
Contributor

This may have broken the docker registry deployment

@ironcladlou

Copy link
Copy Markdown
Contributor Author

@smarterclayton

This may have broken the docker registry deployment

Interesting... I wonder if the default timeout of 120 seconds too aggressive for the registry.

@smarterclayton

Copy link
Copy Markdown
Contributor

That's really fast - let's bump the timeout up to 10 minutes by default.

On Jun 22, 2015, at 11:20 AM, Dan Mace [email protected] wrote:

@smarterclayton

This may have broken the docker registry deployment

Interesting... I wonder if the default timeout of 120 seconds too aggressive for the registry.

—
Reply to this email directly or view it on GitHub.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

Build was stuck for 22 (!) hours... [test] again?

@ironcladlou

Copy link
Copy Markdown
Contributor Author

[test] again... another delete-all flake?

@ironcladlou

Copy link
Copy Markdown
Contributor Author

Pulling in #3398 temporarily so container logs will be preserved in these flaky test runs.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

Yum repo issues... [test] and test again

@ironcladlou

Copy link
Copy Markdown
Contributor Author

[test] again, jenkins fixed

@smarterclayton

Copy link
Copy Markdown
Contributor

Is there an issue o

@smarterclayton

Copy link
Copy Markdown
Contributor

pen for the registry flake?

@ironcladlou

Copy link
Copy Markdown
Contributor Author

Ah ha!

W0623 22:22:33.346892       1 manager.go:1488] Failed to pull image "openshift/origin-deployer:v1.0.0" from pod "docker-registry-1-deploy_default" and container "deployment": Error pulling image (v1.0.0) from docker.io/openshift/origin-deployer, Error mounting '/dev/mapper/docker-202:1-520846-a459cbf4cfc176b60c13d4dd1391189a2597bc22208ae911db1295aab6f8cbe0' on '/var/lib/docker/devicemapper/mnt/a459cbf4cfc176b60c13d4dd1391189a2597bc22208ae911db1295aab6f8cbe0': invalid argument
E0623 22:22:33.354617       1 manager.go:1498] Error running pod "router-1-deploy_default" container "deployment": no such image

@smarterclayton

Copy link
Copy Markdown
Contributor

Yuck

On Jun 23, 2015, at 7:25 PM, Dan Mace [email protected] wrote:

Ah ha!

W0623 22:22:33.346892 1 manager.go:1488] Failed to pull image "openshift/origin-deployer:v1.0.0" from pod "docker-registry-1-deploy_default" and container "deployment": Error pulling image (v1.0.0) from docker.io/openshift/origin-deployer, Error mounting '/dev/mapper/docker-202:1-520846-a459cbf4cfc176b60c13d4dd1391189a2597bc22208ae911db1295aab6f8cbe0' on '/var/lib/docker/devicemapper/mnt/a459cbf4cfc176b60c13d4dd1391189a2597bc22208ae911db1295aab6f8cbe0': invalid argument
E0623 22:22:33.354617 1 manager.go:1498] Error running pod "router-1-deploy_default" container "deployment": no such image
—
Reply to this email directly or view it on GitHub.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

The docker pull of the deployer image seems to be sporadically failing across jobs. [test]

@ironcladlou

Copy link
Copy Markdown
Contributor Author

Got a green build, rolled back the #3398 patch.

@smarterclayton

Copy link
Copy Markdown
Contributor

Is there an issue open with someone assigned to debug it?

On Jun 24, 2015, at 9:47 AM, Dan Mace [email protected] wrote:

The docker pull of the deployer image seems to be sporadically failing across jobs. [test]

—
Reply to this email directly or view it on GitHub.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

@smarterclayton

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.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

We figured out the jenkins issue. The fix will be rolled into #3398. I'd like to rebase when that lands.

@ncdc

ncdc commented Jun 24, 2015

Copy link
Copy Markdown
Contributor

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.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

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.
@ironcladlou

Copy link
Copy Markdown
Contributor Author

Jenkins should be more stable now... I'm going to see if I can figure out the travis 1.4 errors.

@ironcladlou

Copy link
Copy Markdown
Contributor Author

[test]

@ironcladlou

Copy link
Copy Markdown
Contributor Author

I think this can finally go in. I'm writing off travis for now as too slow/unreliable.

Comment thread hack/test-go.sh Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this anymore? Thought this was test only

@ironcladlou

Copy link
Copy Markdown
Contributor Author

Oops.. thanks. Removed diagnostic code.

@smarterclayton

Copy link
Copy Markdown
Contributor

LGTM [merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/2576/) (Image: devenv-fedora_1872)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin up to 791188a

openshift-bot pushed a commit that referenced this pull request Jun 25, 2015
@openshift-bot
openshift-bot merged commit a348418 into openshift:master Jun 25, 2015
@ironcladlou
ironcladlou deleted the always-canary branch June 26, 2015 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants