fix: update vm if detach a non-existing disk

fix gofmt issue
k3s-v1.14.4
andyzhangx 2019-06-04 15:50:06 +00:00
parent 0020140bf3
commit 04a3e29d7c
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,6 @@ limitations under the License.
package azure package azure
import ( import (
"fmt"
"net/http" "net/http"
"strings" "strings"
@ -132,7 +131,8 @@ func (as *availabilitySet) DetachDisk(diskName, diskURI string, nodeName types.N
} }
if !bFoundDisk { if !bFoundDisk {
return nil, fmt.Errorf("detach azure disk failure, disk %s not found, diskURI: %s", diskName, diskURI) // only log here, next action is to update VM status with original meta data
klog.Errorf("detach azure disk: disk %s not found, diskURI: %s", diskName, diskURI)
} }
newVM := compute.VirtualMachine{ newVM := compute.VirtualMachine{

View File

@ -17,7 +17,6 @@ limitations under the License.
package azure package azure
import ( import (
"fmt"
"net/http" "net/http"
"strings" "strings"
@ -136,7 +135,8 @@ func (ss *scaleSet) DetachDisk(diskName, diskURI string, nodeName types.NodeName
} }
if !bFoundDisk { if !bFoundDisk {
return nil, fmt.Errorf("detach azure disk failure, disk %s not found, diskURI: %s", diskName, diskURI) // only log here, next action is to update VM status with original meta data
klog.Errorf("detach azure disk: disk %s not found, diskURI: %s", diskName, diskURI)
} }
newVM := compute.VirtualMachineScaleSetVM{ newVM := compute.VirtualMachineScaleSetVM{