Skip to content
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

add sleep and retry to azure setup script #4752

Merged
merged 1 commit into from
Apr 4, 2017
Merged

add sleep and retry to azure setup script #4752

merged 1 commit into from
Apr 4, 2017

Conversation

mwhooker
Copy link
Contributor

@mwhooker mwhooker commented Apr 4, 2017

  • adds retry around azure cli comands
  • adds configurable sleep between commands

lightly tested

closes #4007

@mwhooker mwhooker requested a review from boumenot April 4, 2017 00:18
@mwhooker
Copy link
Contributor Author

mwhooker commented Apr 4, 2017

turned off wifi during resource creation and the script looked like it restarted correctly:

info:    group create command OK
==> Creating storage account
info:    Executing command storage account create
+ Checking availability of the storage account name
+ Creating storage account
info:    storage account create command OK
==> Creating application
==> Creating service principal
==> Creating permissions
info:    Executing command role assignment create
+ Finding role with specified name
+ Creating role assignment
error:   Principal xxxx does not exist in the directory xxxx.
error:   Error information has been recorded to /Users/mwhooker/.azure/azure.err
error:   role assignment create command failed

Error creating permissions for: http://mattpacker4
createPermissions failed. Retrying...

Sleeping for 10 seconds to wait for resources to be
created. If you get an error about a resource not existing, you can
try increasing the amount of time we wait after creating resources
by setting PACKER_SLEEP_TIME to something higher than the default.

==> Creating permissions
info:    Executing command role assignment create
+ Finding role with specified name
-data:    RoleAssignmentId     : /subscriptions/xxxx/providers/Microsoft.Authorization/roleAssignments/xxxx
data:    RoleDefinitionName   : Owner
data:    RoleDefinitionId     : xxxx
data:    Scope                : /subscriptions/xxxx
data:    Display Name         : mattpacker4
data:    SignInName           : undefined
data:    ObjectId             : xxxx
data:    ObjectType           : ServicePrincipal
data:
+
info:    role assignment create command OK

@mwhooker mwhooker merged commit af9e755 into master Apr 4, 2017
@mwhooker mwhooker deleted the fix-4007 branch April 4, 2017 17:31
mwhooker added a commit that referenced this pull request Apr 4, 2017
add sleep and retry to azure setup script
@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azure-setup.sh no longer works
1 participant