shwstppr commented on code in PR #7761:
URL: https://github.com/apache/cloudstack/pull/7761#discussion_r1270363132
##########
plugins/storage/volume/solidfire/src/main/java/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java:
##########
@@ -188,12 +192,25 @@ public boolean grantAccess(DataObject dataObject, Host
host, DataStore dataStore
}
@Override
- public void revokeAccess(DataObject dataObject, Host host, DataStore
dataStore)
- {
+ public void revokeAccess(DataObject dataObject, Host host, DataStore
dataStore) {
if (dataObject == null || host == null || dataStore == null) {
return;
}
+ // Workaround: don't unplug iscsi lun when volume is attached to a VM
+ // This is regression workaround from upper layers which are calling
+ // ::releaseVmResources that calls the revoke on attached disk of a VM
+ if (dataObject.getType() == DataObjectType.VOLUME) {
Review Comment:
can be a separate method
##########
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java:
##########
@@ -1113,6 +1113,9 @@ private long getVMSnapshotChainSize(VmwareContext
context, VmwareHypervisorHost
DatastoreMO dsMo = new DatastoreMO(context, morDs);
HostDatastoreBrowserMO browserMo = dsMo.getHostDatastoreBrowserMO();
String datastorePath = (new DatastoreFile(dsMo.getName(),
vmName)).getPath();
+ if (datastorePath.startsWith("[-iqn.")) { // ex.
[-iqn.2010-01.com.solidfire:3p53.data-9999.97-0] i-2-9999-VM
Review Comment:
maybe we can have a method in one of the util classes to use it across
##########
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java:
##########
@@ -927,6 +927,7 @@ private Answer execute(ResizeVolumeCommand cmd) {
ClusterMO clusterMO = new ClusterMO(context, morCluster);
List<Pair<ManagedObjectReference, String>> lstHosts =
clusterMO.getClusterHosts();
+ _storageProcessor.rescanAllHosts(context, lstHosts, true,
true);
Review Comment:
I hope this won't cause an issue when there are many hosts in one cluster.
Not sure if there is a way to limit rescanning to specific hosts or should we
limit it to Solidfire volumes?
##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -1879,8 +1879,8 @@ public void prepare(VirtualMachineProfile vm,
DeployDestination dest) throws Sto
throw new
StorageAccessException(String.format("Unable to grant access to volume [%s] on
host [%s].", volToString, host));
}
} else {
- // This might impact other managed storages, grant
access for PowerFlex storage pool only
- if (pool.getPoolType() ==
Storage.StoragePoolType.PowerFlex) {
+ // This might impact other managed storages, grant
access for PowerFlex and Iscsi/Solidfire storage pool only
+ if (pool.getPoolType() ==
Storage.StoragePoolType.PowerFlex || pool.getPoolType() ==
Storage.StoragePoolType.Iscsi) {
Review Comment:
```suggestion
if (List.of(Storage.StoragePoolType.PowerFlex,
Storage.StoragePoolType.Iscsi).contains(pool.getPoolType())) {
```
Based on SolidFirePrimaryDataStoreLifeCycle class, iscsi check looks fine
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]