Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
540f7f20
Unverified
Commit
540f7f20
authored
Aug 15, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Aug 15, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #81338 from feiskyer/automated-cherry-pick-of-#81279-upstream-release-1.15
Automated cherry pick of #81279: Fix Azure client requests stuck issues on
parents
cba0944b
acbf9143
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
azure.go
staging/src/k8s.io/legacy-cloud-providers/azure/azure.go
+15
-0
No files found.
staging/src/k8s.io/legacy-cloud-providers/azure/azure.go
View file @
540f7f20
...
...
@@ -20,6 +20,7 @@ import (
"fmt"
"io"
"io/ioutil"
"net/http"
"strings"
"sync"
"time"
...
...
@@ -226,6 +227,20 @@ type Cloud struct {
}
func
init
()
{
// In go-autorest SDK https://github.com/Azure/go-autorest/blob/master/autorest/sender.go#L258-L287,
// if ARM returns http.StatusTooManyRequests, the sender doesn't increase the retry attempt count,
// hence the Azure clients will keep retrying forever until it get a status code other than 429.
// So we explicitly removes http.StatusTooManyRequests from autorest.StatusCodesForRetry.
// Refer https://github.com/Azure/go-autorest/issues/398.
// TODO(feiskyer): Use autorest.SendDecorator to customize the retry policy when new Azure SDK is available.
statusCodesForRetry
:=
make
([]
int
,
0
)
for
_
,
code
:=
range
autorest
.
StatusCodesForRetry
{
if
code
!=
http
.
StatusTooManyRequests
{
statusCodesForRetry
=
append
(
statusCodesForRetry
,
code
)
}
}
autorest
.
StatusCodesForRetry
=
statusCodesForRetry
cloudprovider
.
RegisterCloudProvider
(
CloudProviderName
,
NewCloud
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment