ViPR Controller : Deleting a datastore fails with "Unable to find datastore"
Summary: Running a ViPR Controller "Delete Datastore and Volume" order fails with the error "Unable to find datastore".
Symptoms
The user is unable to delete a VMware datastore and volume via the VIPR Controller Delete Datastore and Volume catalog order.
ViPR Controller UI error:
Message: Unable to find datastore DATASTORE_NAME in datacenter DC_NAME
Status: ERROR
Catalog Service: Delete Datastore and Volume
Cause
The datastore was deleted by the user therefore ViPR Controller cannot find the datastore to unmount.
Resolution
Workaround:
Re-create the the datastore again on that particular volume and re-run the "Remove block volume for VMware" order.
Resolution
- Remove the Datastore tag on the volume in VIPR-Controller
- Perform an "Unexport and Remove Block Volume"order.
To remove the datastore/VMFS volume tag run the command below:
/opt/storageos/clin/bin/viprcli volume tag -remove "vipr:vmfsDatastore-ESX_CLUSTER_URN=DATASTORE_NAME" -pr "PROJECT_NAME" -name "VIPRC_VOLUME_NAME" -tn "TENANT_NAME"
Note:
1. ESX_CLUSTER_URN is the URN id of the ESX Cluster in the ViPR-C DB.
To retrieve a list of the clusters and their respective VIPR-C URN id's please run the following command from the ViPR CLI.
/opt/storageos/bin/dbutils list Cluster | grep "label" -B 12 | grep "id:\|label"
2. DATASTORE_NAME is the name of the VMware datstore as it appears in vSphere.
3. PROJECT_NAME is the name VIPR project that the volume is associated to.
4. VIPRC_VOLUME_NAME is the name of the volume as it appears in the ViPR-C UI.
5. TENANT_NAME is the name of the Tenant that the VIPR-C volume is associated to.
Additional Information
ViPR Controller UI errors:
[INFO] Tue Sep 11 10:15:22 UTC 2018 Find Datastore did not succeed, will retry: Unable to find datastore DATASTORE_NAME in datacenter DC_NAME
[INFO] Tue Sep 11 10:15:32 UTC 2018 Retrying Find Datastore
[ERROR] Tue Sep 11 10:15:32 UTC 2018 Maximum number of retries exceeded for Find Datastore
[ERROR] Tue Sep 11 10:15:32 UTC 2018 Find Datastore failed with error: 'Unable to find datastore DATASTORE_NAME in datacenter DC_NAME'
[ERROR] Tue Sep 11 10:15:32 UTC 2018 Unable to find datastore DATASTORE_NAME in datacenter DC_NAME
com.iwave.ext.vmware.VMWareException: Unable to find datastore DATASTORE_NAME in datacenter DC_NAME
at com.emc.sa.service.vmware.tasks.FindDatastore.tryExecute(FindDatastore.java:31)
at com.emc.sa.service.vmware.tasks.FindDatastore.tryExecute(FindDatastore.java:13)
at com.emc.sa.service.vmware.tasks.RetryableTask.tryOnce(RetryableTask.java:62)
at com.emc.sa.service.vmware.tasks.RetryableTask.executeTask(RetryableTask.java:55)