зеркало из https://github.com/Azure/ARO-RP.git
Merge pull request #1220 from jim-minter/authrefresh
refresh auth on quota
This commit is contained in:
Коммит
367b65cf8e
|
@ -62,7 +62,7 @@ func (m *manager) Install(ctx context.Context) error {
|
|||
|
||||
steps := map[api.InstallPhase][]steps.Step{
|
||||
api.InstallPhaseBootstrap: {
|
||||
steps.Action(m.validateQuota),
|
||||
steps.AuthorizationRefreshingAction(nil, steps.Action(m.validateQuota)),
|
||||
steps.AuthorizationRefreshingAction(m.fpAuthorizer, steps.Action(m.validateResources)),
|
||||
steps.Action(m.ensureACRToken),
|
||||
steps.Action(m.generateSSHKey),
|
||||
|
|
|
@ -71,6 +71,9 @@ func (s authorizationRefreshingActionStep) run(ctx context.Context, log *logrus.
|
|||
azureerrors.HasLinkedAuthorizationFailedError(err)) {
|
||||
log.Print(err)
|
||||
// Try refreshing auth.
|
||||
if s.authorizer == nil {
|
||||
return false, nil // retry step
|
||||
}
|
||||
_, err = s.authorizer.RefreshWithContext(ctx, log)
|
||||
return false, err // retry step
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче