Change:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! If the matter is security related, please disclose it privately via --What happened: A storageAccount API call blocks kubelet from becoming Ready when there isn't any outbound IP, 1. eventually (after 10mins), the kubelet registers again... there is a call to the ARM API done by which blocks for 10mins, before letting kubelet complete with its starting logic and making the node as details: What you expected to happen: How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Environment: Kubernetes version (use ): v1.11.5 Cloud provider or hardware configuration: OS (e.g. from /etc/os-release): Kernel (e.g. ): Install tools: Others: /sig azure /assign

Discussion:
cloud:                 az, } <del> // BlobDiskController: contains the function needed to // create/attach/detach/delete blob based (unmanaged disks) blobController, err := newBlobDiskController(common) if err != nil { return fmt.Errorf("AzureDisk -  failed to init Blob Disk Controller with error (%s)", err.Error()) } // ManagedDiskController: contains the functions needed to // create/attach/detach/delete managed disks managedController, err := newManagedDiskController(common) if err != nil { return fmt.Errorf("AzureDisk -  failed to init Managed  Disk Controller with error (%s)", err.Error()) } az.BlobDiskController = blobController az.ManagedDiskController = managedController </del> <ins> az.BlobDiskController = &BlobDiskController{common: common} az.ManagedDiskController = &ManagedDiskController{common: common} </ins> az.controllerCommon = common return nil

import ( "bytes" <ins> "context" </ins> "encoding/binary" "fmt" "net/url"

accountsLock = &sync.Mutex{} ) <del> func newBlobDiskController(common *controllerCommon) (*BlobDiskController, error) { c := BlobDiskController{common: common} </del> <ins> func (c *BlobDiskController) initStorageAccounts() { accountsLock.Lock() defer accountsLock.Unlock() </ins> <del> // get accounts accounts, err := c.getAllStorageAccounts() if err != nil { klog.Errorf("azureDisk - getAllStorageAccounts error: %v", err) c.accounts = make(map[string]*storageAccountState) return &c, nil </del> <ins> if c.accounts == nil { // get accounts accounts, err := c.getAllStorageAccounts() if err != nil { klog.Errorf("azureDisk - getAllStorageAccounts error: %v", err) c.accounts = make(map[string]*storageAccountState) } c.accounts = accounts </ins> } <del> c.accounts = accounts return &c, nil </del> } // CreateVolume creates a VHD blob in a storage account that has storageType and location using the given storage account.

func (c *BlobDiskController) CreateBlobDisk(dataDiskName string, storageAccountType storage.SkuName, sizeGB int) (string, error) { klog.V(4).Infof("azureDisk - creating blob data disk named:%s on StorageAccountType:%s", dataDiskName, storageAccountType) <ins> c.initStorageAccounts() </ins> storageAccountName, err := c.findSANameForDisk(storageAccountType) if err != nil { return "", err

} func (c *BlobDiskController) getAllStorageAccounts() (map[string]*storageAccountState, error) { <del> ctx, cancel := getContextWithCancel() </del> <ins> ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) </ins> defer cancel() accountListResult, err := c.common.cloud.StorageAccountClient.ListByResourceGroup(ctx, c.common.resourceGroup) if err != nil {

DiskMBpsReadWrite string } <del> func newManagedDiskController(common *controllerCommon) (*ManagedDiskController, error) { return &ManagedDiskController{common: common}, nil } </del> //CreateManagedDisk : create managed disk func (c *ManagedDiskController) CreateManagedDisk(options *ManagedDiskOptions) (string, error) { var err error

"context" "fmt" "strings" <ins> "time" </ins> "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute" "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2018-07-01/storage"

} if vmSizeList == nil { <del> result, err := az.VirtualMachineSizesClient.List(context.TODO(), az.Location) </del> <ins> ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) defer cancel() result, err := az.VirtualMachineSizesClient.List(ctx, az.Location) </ins> if err != nil || result.Value == nil { klog.Errorf("failed to list vm sizes in GetVolumeLimits, plugin.host: %s, location: %s", plugin.host.GetHostName(), az.Location) return volumeLimits, nil