From e92b5fe9c1cbc9d2ae47461745cdf41cca132a90 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Wed, 31 May 2023 12:07:47 -0400 Subject: [PATCH] mantle/platform: bump Azure API timeout to 10m for instance creation 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. --- mantle/platform/api/azure/instance.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mantle/platform/api/azure/instance.go b/mantle/platform/api/azure/instance.go index 57e1b94c4a..8a3ef46171 100644 --- a/mantle/platform/api/azure/instance.go +++ b/mantle/platform/api/azure/instance.go @@ -166,7 +166,7 @@ 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 { @@ -174,7 +174,7 @@ func (a *API) CreateInstance(name, userdata, sshkey, resourceGroup, storageAccou } _, 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) {