mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #104572 from andyzhangx/detach-disk-deleting
fix detach disk issue on deleting vmss node
This commit is contained in:
commit
758ad0790c
@ -454,5 +454,8 @@ func getValidCreationData(subscriptionID, resourceGroup, sourceResourceID, sourc
|
||||
|
||||
func isInstanceNotFoundError(err error) bool {
|
||||
errMsg := strings.ToLower(err.Error())
|
||||
if strings.Contains(errMsg, strings.ToLower(vmssVMNotActiveErrorMessage)) {
|
||||
return true
|
||||
}
|
||||
return strings.Contains(errMsg, errStatusCode400) && strings.Contains(errMsg, errInvalidParameter) && strings.Contains(errMsg, errTargetInstanceIds)
|
||||
}
|
||||
|
@ -809,8 +809,8 @@ func TestIsInstanceNotFoundError(t *testing.T) {
|
||||
expectedResult: false,
|
||||
},
|
||||
{
|
||||
errMsg: "not an active Virtual Machine scale set vm",
|
||||
expectedResult: false,
|
||||
errMsg: "The provided instanceId 857 is not an active Virtual Machine Scale Set VM instanceId.",
|
||||
expectedResult: true,
|
||||
},
|
||||
{
|
||||
errMsg: `compute.VirtualMachineScaleSetVMsClient#Update: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="The provided instanceId 1181 is not an active Virtual Machine Scale Set VM instanceId." Target="instanceIds"`,
|
||||
|
Loading…
Reference in New Issue
Block a user