From c7fe83266acd61d3a02f2e19d20f488f1a010a67 Mon Sep 17 00:00:00 2001 From: Balu Dontu Date: Fri, 15 Sep 2017 15:47:45 -0700 Subject: [PATCH] Unable to detach the vSphere volume from Powered off node --- pkg/cloudprovider/providers/vsphere/vsphere.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cloudprovider/providers/vsphere/vsphere.go b/pkg/cloudprovider/providers/vsphere/vsphere.go index 3f0e6658210..145fd8d4c60 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere.go @@ -411,8 +411,8 @@ func (vs *VSphere) InstanceID(nodeName k8stypes.NodeName) (string, error) { if isActive { return "/" + vm.InventoryPath, nil } - - return "", fmt.Errorf("The node %q is not active", nodeNameToVMName(nodeName)) + glog.Warningf("The VM: %s is not in %s state", nodeNameToVMName(nodeName), vclib.ActivePowerState) + return "", cloudprovider.InstanceNotFound } // InstanceTypeByProviderID returns the cloudprovider instance type of the node with the specified unique providerID