Skip to content

Commit

Permalink
mantle/platform: bump Azure API timeout to 10m for instance creation
Browse files Browse the repository at this point in the history
Looks like we're bumping up into this again regularly. I suspect it's
Azure just having trouble and will resolve itself in a few weeks. I
think bumping it a few more minutes won't be a big deal but wouldn't
want to go over 10.

Let's also disambiguate the error message generated from
BeginCreateOrUpdate versus PollUntilDone.
  • Loading branch information
dustymabe committed May 31, 2023
1 parent 8f7c06a commit e92b5fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mantle/platform/api/azure/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ func (a *API) CreateInstance(name, userdata, sshkey, resourceGroup, storageAccou

vmParams := a.getVMParameters(name, userdata, sshkey, fmt.Sprintf("https://%s.blob.core.windows.net/", storageAccount), ip, nic)

ctx, cancel := context.WithTimeout(context.Background(), 8*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
poller, err := a.compClient.BeginCreateOrUpdate(ctx, resourceGroup, name, vmParams, nil)
if err != nil {
return nil, fmt.Errorf("creating instance failed: %w", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
return nil, err
return nil, fmt.Errorf("waiting on instance creation failed: %w", err)
}

err = util.WaitUntilReady(5*time.Minute, 10*time.Second, func() (bool, error) {
Expand Down

0 comments on commit e92b5fe

Please sign in to comment.