Skip to content

Commit

Permalink
Merge pull request #3452 from nilo19/bug/cherry-pick-3418-1-18
Browse files Browse the repository at this point in the history
Cherry pick the bug fix in #2418 onto 1.18
  • Loading branch information
k8s-ci-robot authored Aug 23, 2020
2 parents 3ecf85c + 8352911 commit 45b905c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cluster-autoscaler/cloudprovider/azure/azure_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,12 @@ func (util *AzUtil) DeleteVirtualMachine(rg string, name string) error {

osDiskName := vm.VirtualMachineProperties.StorageProfile.OsDisk.Name
var nicName string
var err error
nicID := (*vm.VirtualMachineProperties.NetworkProfile.NetworkInterfaces)[0].ID
if nicID == nil {
klog.Warningf("NIC ID is not set for VM (%s/%s)", rg, name)
} else {
nicName, err := resourceName(*nicID)
nicName, err = resourceName(*nicID)
if err != nil {
return err
}
Expand Down

0 comments on commit 45b905c

Please sign in to comment.