From 222bf3ac839d0c27886ad8ff8b21971d68f5bf28 Mon Sep 17 00:00:00 2001 From: Jim Minter Date: Tue, 26 Nov 2019 06:52:18 -0600 Subject: [PATCH] increase delete timeout --- pkg/backend/delete.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/backend/delete.go b/pkg/backend/delete.go index aef28e460..e2e0396b7 100644 --- a/pkg/backend/delete.go +++ b/pkg/backend/delete.go @@ -4,6 +4,7 @@ import ( "context" "net/http" "os" + "time" "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-05-01/resources" @@ -19,6 +20,7 @@ func (b *backend) delete(ctx context.Context, log *logrus.Entry, doc *api.OpenSh groups := resources.NewGroupsClient(doc.SubscriptionID) groups.Authorizer = b.authorizer + groups.Client.PollingDuration = time.Hour log.Printf("deleting dns") _, err := recordsets.Delete(ctx, os.Getenv("RESOURCEGROUP"), b.domain, "api."+doc.OpenShiftCluster.Name, dns.CNAME, "") @@ -31,8 +33,6 @@ func (b *backend) delete(ctx context.Context, log *logrus.Entry, doc *api.OpenSh doc.OpenShiftCluster.Properties.MasterProfile.SubnetID, doc.OpenShiftCluster.Properties.WorkerProfiles[0].SubnetID, } { - log.Printf("removing network security group from subnet %s", subnetID) - // TODO: there is probably an undesirable race condition here - check if etags can help. s, err := subnet.Get(ctx, &doc.OpenShiftCluster.Properties.ServicePrincipalProfile, subnetID) if err != nil { @@ -42,6 +42,7 @@ func (b *backend) delete(ctx context.Context, log *logrus.Entry, doc *api.OpenSh if s.SubnetPropertiesFormat != nil { s.SubnetPropertiesFormat.NetworkSecurityGroup = nil + log.Printf("removing network security group from subnet %s", subnetID) err = subnet.CreateOrUpdate(ctx, &doc.OpenShiftCluster.Properties.ServicePrincipalProfile, subnetID, s) if err != nil { return err