Change:
I am trying to run Azure e2e tests: The test creates a volume in the cloud + runs a pod with the volume as in-line. The pod never starts: The test creates a "blob" disk, while the Azure machine expects "managed" disk. Does anyone run storage e2e tests on Azure regularly? Was it ever working? Managed disks are provisioned . Should the test suite create "managed" disks by default too? Environment: Kubernetes version (use ): v1.17.0-alpha.0.1089+-dirty
/sig azure
/sig cloud-provider
managed disk should be the default, the azure disk storage class in the test case may have
The volume is created outside of kubernetes dynamic provisioning to test pre-provisioned and inline volumes: I wonder if anyone actually runs the tests.

Discussion:
"//staging/src/k8s.io/apimachinery/pkg/util/uuid:go_default_library", "//staging/src/k8s.io/legacy-cloud-providers/azure:go_default_library", "//test/e2e/framework:go_default_library", <ins> "//vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute:go_default_library", </ins> ], )

"fmt" "os" <ins> "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute" </ins> v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/kubernetes/test/e2e/framework"

// CreatePD creates a persistent volume func (p *Provider) CreatePD(zone string) (string, error) { pdName := fmt.Sprintf("%s-%s", framework.TestContext.Prefix, string(uuid.NewUUID())) <del> _, diskURI, _, err := p.azureCloud.CreateVolume(pdName, "" /* account */, "" /* sku */, "" /* location */, 1 /* sizeGb */) if err != nil { return "", err </del> <ins> volumeOptions := &azure.ManagedDiskOptions{ DiskName:           pdName, StorageAccountType: compute.StandardLRS, ResourceGroup:      "", PVCName:            pdName, SizeGB:             1, Tags:               nil, AvailabilityZone:   zone, DiskIOPSReadWrite:  "", DiskMBpsReadWrite:  "", </ins> } <del> return diskURI, nil </del> <ins> return p.azureCloud.CreateManagedDisk(volumeOptions) </ins> } // DeletePD deletes a persistent volume func (p *Provider) DeletePD(pdName string) error { <del> if err := p.azureCloud.DeleteVolume(pdName); err != nil { </del> <ins> if err := p.azureCloud.DeleteManagedDisk(pdName); err != nil { </ins> framework.Logf("failed to delete Azure volume %q: %v", pdName, err) return err }

diskName := av.volumeName[(strings.LastIndex(av.volumeName, "/") + 1):] <ins> kind := v1.AzureManagedDisk </ins> volSource := v1.VolumeSource{ AzureDisk: &v1.AzureDiskVolumeSource{ DiskName:    diskName, DataDiskURI: av.volumeName, <ins> Kind:        &kind, </ins> ReadOnly:    &readOnly, }, }

diskName := av.volumeName[(strings.LastIndex(av.volumeName, "/") + 1):] <ins> kind := v1.AzureManagedDisk </ins> pvSource := v1.PersistentVolumeSource{ AzureDisk: &v1.AzureDiskVolumeSource{ DiskName:    diskName, DataDiskURI: av.volumeName, <ins> Kind:        &kind, </ins> ReadOnly:    &readOnly, }, }

func (a *azureDriver) CreateVolume(config *testsuites.PerTestConfig, volType testpatterns.TestVolType) testsuites.TestVolume { ginkgo.By("creating a test azure disk volume") <ins> if volType == testpatterns.InlineVolume { // Volume will be created in framework.TestContext.CloudConfig.Zone zone, // so pods should be also scheduled there. config.ClientNodeSelector = map[string]string{ v1.LabelZoneFailureDomain: framework.TestContext.CloudConfig.Zone, } } </ins> volumeName, err := framework.CreatePDWithRetry() framework.ExpectNoError(err) return &azureVolume{