Merge pull request #78790 from andyzhangx/automated-cherry-pick-of-#78700-upstream-release-1.14

Automated cherry pick of #78700: fix: update vm if detach a non-existing disk
k3s-v1.14.4
Kubernetes Prow Robot 2019-06-20 14:30:54 -07:00 committed by GitHub
commit 3df2c60c4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,6 @@ limitations under the License.
package azure
import (
"fmt"
"net/http"
"strings"
@ -132,7 +131,8 @@ func (as *availabilitySet) DetachDisk(diskName, diskURI string, nodeName types.N
}
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{

View File

@ -17,7 +17,6 @@ limitations under the License.
package azure
import (
"fmt"
"net/http"
"strings"
@ -136,7 +135,8 @@ func (ss *scaleSet) DetachDisk(diskName, diskURI string, nodeName types.NodeName
}
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{