fix VNet reconciler that causes mysql test failure
@@ -9,6 +9,7 @@ import (
"net/http"
"strings"
+ "github.com/Azure/azure-sdk-for-go/profiles/latest/network/mgmt/network"
azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
"github.com/Azure/azure-service-operator/pkg/errhelp"
"github.com/Azure/azure-service-operator/pkg/helpers"
@@ -35,6 +36,7 @@ func (g *AzureVNetManager) Ensure(ctx context.Context, obj runtime.Object, opts
// consider the reconcilliation successful
vNet, err := g.GetVNet(ctx, resourceGroup, resourceName)
if err == nil {
+ if vNet.ProvisioningState == network.Succeeded {
// succeeded! end reconcilliation successfully
instance.Status.Provisioning = false
instance.Status.Provisioned = true
@@ -43,6 +45,7 @@ func (g *AzureVNetManager) Ensure(ctx context.Context, obj runtime.Object, opts
instance.Status.ResourceId = *vNet.ID
return true, nil
}
+ }
instance.Status.Provisioning = true
result, err := g.CreateVNet(
