-
Notifications
You must be signed in to change notification settings - Fork 1.5k
pkg/destroy/aws: Don't give up on Route 53 rate limits #940
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
pkg/destroy/aws: Don't give up on Route 53 rate limits #940
Conversation
We've been meaning to take this off the hands of the Hive folks for a while. Finally copy it over (I'll drop the vendored copy soon). This is a verbatim copy of the file as it stands with openshift/hive@ad6f8d5b (Merge pull request openshift/hive#143 from abutcher/capischeme, 2018-12-18).
The fact that it's a subpackage of pkg/destroy is sufficient context without repeating "deprovision" in the package name. And the fact that the deprovision is tag based is an implementation detail that doesn't need to be surfaced in the package name. Also drop the copyright header. We're also an Apache-2.0 project, so this just removes the copyright holder information from the header. And "the Kubernetes Authors" wasn't all that helpful anyway. If folks want to see who authored the contents, they should check the Git history. I'm breaking that history here, so here's a list of authors in case the hive repository goes away or something: Abhinav Dahiya, Dan Mace, Devan Goodwin, Joel Diaz, Miciah Masters, Thomas Wiest, and me.
Generated with: $ emacs Gopkg.toml # drop the hive constraint $ dep ensure using: $ dep version dep: version : v0.5.0 build date : git hash : 22125cf go version : go1.10.3 go compiler : gc platform : linux/amd64 features : ImportDuringSolve=false
|
can't we move the throttled error handling up to the runners here That way all throttled requests are handled at a common place. |
Also why can't we use installer/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go Line 119 in dd6fd9f
we could switch the impl of |
We've been hitting Route 53 rate limits in the busy CI account: level=debug msg="Deleting Route53 zones (map[openshiftClusterID:5b0921a0-5e21-4ebf-a5f9-396a92526ec1])" level=debug msg="Deleting Route53 zones (map[kubernetes.io/cluster/ci-op-piz2m00h-1d3f3:owned])" level=debug msg="error converting r53Zones to native AWS objects: Throttling: Rate exceeded\n\tstatus code: 400, request id: 80e10c03-0306-11e9-b9b6-abeb053f0218" level=debug msg="Exiting deleting Route53 zones (map[kubernetes.io/cluster/ci-op-piz2m00h-1d3f3:owned])" level=debug msg="error converting r53Zones to native AWS objects: Throttling: Rate exceeded\n\tstatus code: 400, request id: 81cd4026-0306-11e9-9710-21e3250d9953" level=debug msg="Exiting deleting Route53 zones (map[openshiftClusterID:5b0921a0-5e21-4ebf-a5f9-396a92526ec1])" We've had trouble with Route 53 rate limits before; see discussion in openshift/hive@f945dbb3 (awstagdeprovision: Ignore more errors, 2018-11-27, openshift/hive#113). With this commit, instead of bailing part way through listing tags for all the hosted zones, we just retry that particular zone until it goes through and keep going on tags for the whole list. This should reduce our overall load on the Route 53 APIs.
4d7b82d to
6447e9c
Compare
Because I hadn't found it ;). Done now with 4d7b82d -> 6447e9c. |
The existing exponential backoff there is handling throttling. 6447e9c adds special handling for Route 53 because:
|
To avoid [1]: 2018/12/19 00:01:38 Executing test golint /go/src/github.com/openshift/installer/pkg/destroy/aws/aws.go:33:6: type name will be used as aws.AWSFilter by other packages, and that stutters; consider calling this Filter Found 1 lint suggestions; failing. [1]: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_installer/940/pull-ci-openshift-installer-master-golint/1879/build-log.txt
This seems good enough reason to do r53 only handling..
|
|
All green, and teardown was so fast I missed the logs :p. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Generated with: $ dep ensure using: $ dep version dep: version : v0.5.0 build date : git hash : 22125cf go version : go1.10.3 go compiler : gc platform : linux/amd64 features : ImportDuringSolve=false I hadn't realized I'd need this after 6447e9c (pkg/destroy/aws: Don't give up on Route 53 rate limits, 2018-12-18, openshift#940) added a direct consumer of this package.
|
#957 seems related to this. Failing on zone list rate limit. Can we avoid listing a huge number of zones somehow? |
We've been hitting Route 53 rate limits in the busy CI account:
We've had trouble with Route 53 rate limits before; see discussion in openshift/hive@f945dbb3 (openshift/hive#113). With this commit, instead of bailing part way through listing tags for all the hosted zones, we just retry that particular zone until it goes through and keep going on tags for the whole list. This should reduce our overall load on the Route 53 APIs.
The current
strings.Containscomparison is a bit of a hack based on the above log excerpt. But there doesn't seem to be a strongly-typed approach to this; see the internalisCodeThrottleinvendor/github.com/aws/aws-sdk-go/aws/request/retryer.go.I've also taken the opportunity to pull the Hive package over into our repository (and I've dropped it from
vendor/). We'd been planning on doing this for a while, but hadn't gotten around to it before. Once this PR lands, I'll file one with Hive so they can vendor us forhiveutil. CC @joelddiaz