Skip to content

Commit c015d67

Browse files
Support migration between different PowerFlex clusters when connect on demand is enabled
- Prepare the PowerFlex/ScaleIO pool on the host when needed during the migration - Register the PowerFlex/ScaleIO pool on agent if needed - Fix live migration between PowerFlex/ScaleIO pools
1 parent 31b6855 commit c015d67

11 files changed

Lines changed: 290 additions & 56 deletions

File tree

‎engine/components-api/src/main/java/com/cloud/storage/StorageManager.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ static Boolean getFullCloneConfiguration(Long storeId) {
327327

328328
boolean canHostAccessStoragePool(Host host, StoragePool pool);
329329

330+
boolean canHostAccessOrPrepareStoragePool(Host host, StoragePool pool);
331+
330332
boolean canHostPrepareStoragePoolAccess(Host host, StoragePool pool);
331333

332334
boolean canDisconnectHostFromStoragePool(Host host, StoragePool pool);

‎engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@
260260
import com.cloud.storage.dao.DiskOfferingDao;
261261
import com.cloud.storage.dao.GuestOSCategoryDao;
262262
import com.cloud.storage.dao.GuestOSDao;
263-
import com.cloud.storage.dao.StoragePoolHostDao;
264263
import com.cloud.storage.dao.VMTemplateDao;
265264
import com.cloud.storage.dao.VMTemplateZoneDao;
266265
import com.cloud.storage.dao.VolumeDao;
@@ -372,8 +371,6 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
372371
@Inject
373372
private NetworkDao _networkDao;
374373
@Inject
375-
private StoragePoolHostDao _poolHostDao;
376-
@Inject
377374
private VMSnapshotDao _vmSnapshotDao;
378375
@Inject
379376
private AffinityGroupVMMapDao _affinityGroupVMMapDao;
@@ -3422,7 +3419,7 @@ protected Map<Volume, StoragePool> buildMapUsingUserInformation(VirtualMachinePr
34223419
StoragePoolVO currentPool = _storagePoolDao.findById(volume.getPoolId());
34233420

34243421
executeManagedStorageChecksWhenTargetStoragePoolProvided(currentPool, volume, targetPool);
3425-
if (targetHost != null && _poolHostDao.findByPoolHost(targetPool.getId(), targetHost.getId()) == null) {
3422+
if (targetHost != null && !storageMgr.canHostAccessOrPrepareStoragePool(targetHost, targetPool)) {
34263423
throw new CloudRuntimeException(
34273424
String.format("Cannot migrate the volume [%s] to the storage pool [%s] while migrating VM [%s] to target host [%s]. The host does not have access to the storage pool entered.",
34283425
volume.getUuid(), targetPool.getUuid(), profile.getUuid(), targetHost.getUuid()));
@@ -3503,7 +3500,7 @@ protected void executeManagedStorageChecksWhenTargetStoragePoolNotProvided(Host
35033500
if (!currentPool.isManaged()) {
35043501
return;
35053502
}
3506-
if (targetHost != null && _poolHostDao.findByPoolHost(currentPool.getId(), targetHost.getId()) == null) {
3503+
if (targetHost != null && !storageMgr.canHostAccessOrPrepareStoragePool(targetHost, currentPool)) {
35073504
throw new CloudRuntimeException(String.format("The target host does not have access to the volume's managed storage pool. [volumeId=%s, storageId=%s, targetHostId=%s].", volume.getUuid(),
35083505
currentPool.getUuid(), targetHost.getUuid()));
35093506
}

‎engine/orchestration/src/test/java/com/cloud/vm/VirtualMachineManagerImplTest.java‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,11 @@
143143
import com.cloud.storage.Storage;
144144
import com.cloud.storage.StorageManager;
145145
import com.cloud.storage.StoragePool;
146-
import com.cloud.storage.StoragePoolHostVO;
147146
import com.cloud.storage.VMTemplateVO;
148147
import com.cloud.storage.VMTemplateZoneVO;
149148
import com.cloud.storage.Volume;
150149
import com.cloud.storage.VolumeVO;
151150
import com.cloud.storage.dao.DiskOfferingDao;
152-
import com.cloud.storage.dao.StoragePoolHostDao;
153151
import com.cloud.storage.dao.VMTemplateDao;
154152
import com.cloud.storage.dao.VMTemplateZoneDao;
155153
import com.cloud.storage.dao.VolumeDao;
@@ -226,8 +224,6 @@ public class VirtualMachineManagerImplTest {
226224
private VolumeVO volumeVoMock;
227225
private long volumeMockId = 1111L;
228226

229-
@Mock
230-
private StoragePoolHostDao storagePoolHostDaoMock;
231227

232228
@Mock
233229
private StoragePoolAllocator storagePoolAllocatorMock;
@@ -587,7 +583,7 @@ public void buildMapUsingUserInformationTestTargetHostDoesNotHaveAccessToPool()
587583
userDefinedVolumeToStoragePoolMap.put(volumeMockId, storagePoolVoMockId);
588584

589585
Mockito.doNothing().when(virtualMachineManagerImpl).executeManagedStorageChecksWhenTargetStoragePoolProvided(any(StoragePoolVO.class), any(VolumeVO.class), any(StoragePoolVO.class));
590-
Mockito.doReturn(null).when(storagePoolHostDaoMock).findByPoolHost(storagePoolVoMockId, hostMockId);
586+
Mockito.doReturn(false).when(storageManager).canHostAccessOrPrepareStoragePool(hostMock, storagePoolVoMock);
591587

592588
virtualMachineManagerImpl.buildMapUsingUserInformation(virtualMachineProfileMock, hostMock, userDefinedVolumeToStoragePoolMap);
593589

@@ -600,7 +596,7 @@ public void buildMapUsingUserInformationTestTargetHostHasAccessToPool() {
600596

601597
Mockito.doNothing().when(virtualMachineManagerImpl).executeManagedStorageChecksWhenTargetStoragePoolProvided(any(StoragePoolVO.class), any(VolumeVO.class),
602598
any(StoragePoolVO.class));
603-
Mockito.doReturn(Mockito.mock(StoragePoolHostVO.class)).when(storagePoolHostDaoMock).findByPoolHost(storagePoolVoMockId, hostMockId);
599+
Mockito.doReturn(true).when(storageManager).canHostAccessOrPrepareStoragePool(hostMock, storagePoolVoMock);
604600

605601
Map<Volume, StoragePool> volumeToPoolObjectMap = virtualMachineManagerImpl.buildMapUsingUserInformation(virtualMachineProfileMock, hostMock, userDefinedVolumeToStoragePoolMap);
606602

@@ -635,24 +631,24 @@ public void executeManagedStorageChecksWhenTargetStoragePoolNotProvidedTestCurre
635631
virtualMachineManagerImpl.executeManagedStorageChecksWhenTargetStoragePoolNotProvided(hostMock, storagePoolVoMock, volumeVoMock);
636632

637633
verify(storagePoolVoMock).isManaged();
638-
verify(storagePoolHostDaoMock, Mockito.times(0)).findByPoolHost(anyLong(), anyLong());
634+
Mockito.verify(storageManager, Mockito.times(0)).canHostAccessOrPrepareStoragePool(any(Host.class), any(StoragePool.class));
639635
}
640636

641637
@Test
642638
public void executeManagedStorageChecksWhenTargetStoragePoolNotProvidedTestCurrentStoragePoolManagedIsConnectedToHost() {
643639
Mockito.doReturn(true).when(storagePoolVoMock).isManaged();
644-
Mockito.doReturn(Mockito.mock(StoragePoolHostVO.class)).when(storagePoolHostDaoMock).findByPoolHost(storagePoolVoMockId, hostMockId);
640+
Mockito.doReturn(true).when(storageManager).canHostAccessOrPrepareStoragePool(hostMock, storagePoolVoMock);
645641

646642
virtualMachineManagerImpl.executeManagedStorageChecksWhenTargetStoragePoolNotProvided(hostMock, storagePoolVoMock, volumeVoMock);
647643

648644
verify(storagePoolVoMock).isManaged();
649-
verify(storagePoolHostDaoMock, Mockito.times(1)).findByPoolHost(storagePoolVoMockId, hostMockId);
645+
Mockito.verify(storageManager, Mockito.times(1)).canHostAccessOrPrepareStoragePool(hostMock, storagePoolVoMock);
650646
}
651647

652648
@Test(expected = CloudRuntimeException.class)
653649
public void executeManagedStorageChecksWhenTargetStoragePoolNotProvidedTestCurrentStoragePoolManagedIsNotConnectedToHost() {
654650
Mockito.doReturn(true).when(storagePoolVoMock).isManaged();
655-
Mockito.doReturn(null).when(storagePoolHostDaoMock).findByPoolHost(storagePoolVoMockId, hostMockId);
651+
Mockito.doReturn(false).when(storageManager).canHostAccessOrPrepareStoragePool(hostMock, storagePoolVoMock);
656652

657653
virtualMachineManagerImpl.executeManagedStorageChecksWhenTargetStoragePoolNotProvided(hostMock, storagePoolVoMock, volumeVoMock);
658654
}

‎engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,8 +2565,9 @@ protected void verifyLiveMigrationForKVM(Map<VolumeInfo, DataStore> volumeDataSt
25652565
throw new CloudRuntimeException("Destination storage pool with ID " + dataStore.getId() + " was not located.");
25662566
}
25672567

2568-
if (srcStoragePoolVO.isManaged() && srcStoragePoolVO.getId() != destStoragePoolVO.getId()) {
2569-
throw new CloudRuntimeException("Migrating a volume online with KVM from managed storage is not currently supported.");
2568+
boolean isSrcAndDestPoolPowerFlexStorage = srcStoragePoolVO.getPoolType().equals(Storage.StoragePoolType.PowerFlex) && destStoragePoolVO.getPoolType().equals(Storage.StoragePoolType.PowerFlex);
2569+
if (srcStoragePoolVO.isManaged() && !isSrcAndDestPoolPowerFlexStorage && srcStoragePoolVO.getId() != destStoragePoolVO.getId()) {
2570+
throw new CloudRuntimeException("Migrating a volume online with KVM from managed storage (other than PowerFlex) is not currently supported.");
25702571
}
25712572

25722573
if (storageTypeConsistency == null) {

‎engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java‎

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,6 +2060,10 @@ public CopyManagedVolumeContext(AsyncCompletionCallback<T> callback, AsyncCallFu
20602060
private AsyncCallFuture<VolumeApiResult> copyManagedVolume(VolumeInfo srcVolume, DataStore destStore) {
20612061
AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<>();
20622062
VolumeApiResult res = new VolumeApiResult(srcVolume);
2063+
Host hostWithPoolsAccess = null;
2064+
VolumeInfo destVolume = null;
2065+
boolean srcVolumeAccessGranted = false;
2066+
boolean destVolumeAccessGranted = false;
20632067
try {
20642068
if (!snapshotMgr.canOperateOnVolume(srcVolume)) {
20652069
logger.debug("There are snapshots creating for this volume, can not move this volume");
@@ -2079,7 +2083,7 @@ private AsyncCallFuture<VolumeApiResult> copyManagedVolume(VolumeInfo srcVolume,
20792083
poolIds.add(srcVolume.getPoolId());
20802084
poolIds.add(destStore.getId());
20812085

2082-
Host hostWithPoolsAccess = _storageMgr.findUpAndEnabledHostWithAccessToStoragePools(poolIds);
2086+
hostWithPoolsAccess = _storageMgr.findUpAndEnabledHostWithAccessToStoragePools(poolIds);
20832087
if (hostWithPoolsAccess == null) {
20842088
logger.debug("No host(s) available with pool access, can not move this volume");
20852089
res.setResult("No host(s) available with pool access, can not move this volume");
@@ -2088,7 +2092,7 @@ private AsyncCallFuture<VolumeApiResult> copyManagedVolume(VolumeInfo srcVolume,
20882092
}
20892093

20902094
VolumeVO destVol = duplicateVolumeOnAnotherStorage(srcVolume, (StoragePool)destStore);
2091-
VolumeInfo destVolume = volFactory.getVolume(destVol.getId(), destStore);
2095+
destVolume = volFactory.getVolume(destVol.getId(), destStore);
20922096

20932097
// Create a volume on managed storage.
20942098
AsyncCallFuture<VolumeApiResult> createVolumeFuture = createVolumeAsync(destVolume, destStore);
@@ -2117,6 +2121,7 @@ private AsyncCallFuture<VolumeApiResult> copyManagedVolume(VolumeInfo srcVolume,
21172121
srcPrimaryDataStoreDetails.put(StorageManager.STORAGE_POOL_DISK_WAIT.toString(), String.valueOf(StorageManager.STORAGE_POOL_DISK_WAIT.valueIn(srcPrimaryDataStore.getId())));
21182122
srcPrimaryDataStore.setDetails(srcPrimaryDataStoreDetails);
21192123
grantAccess(srcVolume, hostWithPoolsAccess, srcVolume.getDataStore());
2124+
srcVolumeAccessGranted = true;
21202125
}
21212126

21222127
PrimaryDataStore destPrimaryDataStore = (PrimaryDataStore) destStore;
@@ -2131,6 +2136,7 @@ private AsyncCallFuture<VolumeApiResult> copyManagedVolume(VolumeInfo srcVolume,
21312136
destPrimaryDataStore.setDetails(destPrimaryDataStoreDetails);
21322137

21332138
grantAccess(destVolume, hostWithPoolsAccess, destStore);
2139+
destVolumeAccessGranted = true;
21342140

21352141
destVolume.processEvent(Event.CreateRequested);
21362142
srcVolume.processEvent(Event.MigrationRequested);
@@ -2141,17 +2147,40 @@ private AsyncCallFuture<VolumeApiResult> copyManagedVolume(VolumeInfo srcVolume,
21412147

21422148
motionSrv.copyAsync(srcVolume, destVolume, hostWithPoolsAccess, caller);
21432149
} catch (Exception e) {
2144-
logger.error("Copy to managed volume failed due to: " + e);
2145-
if(logger.isDebugEnabled()) {
2150+
logger.error("Copy to managed volume failed due to: {}", String.valueOf(e));
2151+
if (logger.isDebugEnabled()) {
21462152
logger.debug("Copy to managed volume failed.", e);
21472153
}
2154+
revokeAccessOnFailedManagedVolumeCopy(srcVolume, destVolume, hostWithPoolsAccess, srcVolumeAccessGranted, destVolumeAccessGranted);
21482155
res.setResult(e.toString());
21492156
future.complete(res);
21502157
}
21512158

21522159
return future;
21532160
}
21542161

2162+
private void revokeAccessOnFailedManagedVolumeCopy(VolumeInfo srcVolume, VolumeInfo destVolume, Host host, boolean srcVolumeAccessGranted, boolean destVolumeAccessGranted) {
2163+
if (host == null) {
2164+
return;
2165+
}
2166+
2167+
if (srcVolumeAccessGranted) {
2168+
try {
2169+
revokeAccess(srcVolume, host, srcVolume.getDataStore());
2170+
} catch (Exception e) {
2171+
logger.warn("Failed to revoke access to volume {} on host {} after a failed managed volume copy", srcVolume, host, e);
2172+
}
2173+
}
2174+
2175+
if (destVolumeAccessGranted) {
2176+
try {
2177+
revokeAccess(destVolume, host, destVolume.getDataStore());
2178+
} catch (Exception e) {
2179+
logger.warn("Failed to revoke access to volume {} on host {} after a failed managed volume copy", destVolume, host, e);
2180+
}
2181+
}
2182+
}
2183+
21552184
protected Void copyManagedVolumeCallBack(AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> callback, CopyManagedVolumeContext<VolumeApiResult> context) {
21562185
VolumeInfo srcVolume = context.srcVolume;
21572186
VolumeInfo destVolume = context.destVolume;

‎plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriver.java‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import javax.inject.Inject;
2424

25+
import com.cloud.hypervisor.Hypervisor;
2526
import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
2627
import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
2728
import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult;
@@ -147,6 +148,8 @@ public class ScaleIOPrimaryDataStoreDriver implements PrimaryDataStoreDriver {
147148
private VolumeService volumeService;
148149
@Inject
149150
private VolumeOrchestrationService volumeMgr;
151+
@Inject
152+
private StorageManager storageMgr;
150153
private ScaleIOSDCManager sdcManager;
151154

152155
public ScaleIOPrimaryDataStoreDriver() {
@@ -200,6 +203,7 @@ private boolean setVolumeLimitsFromDetails(VolumeVO volume, Host host, DataStore
200203
public boolean grantAccess(DataObject dataObject, Host host, DataStore dataStore) {
201204
try {
202205
sdcManager = ComponentContext.inject(sdcManager);
206+
boolean hostConnectedToPool = storagePoolHostDao.findByPoolHost(dataStore.getId(), host.getId()) != null;
203207
final String sdcId = sdcManager.prepareSDC(host, dataStore);
204208
if (StringUtils.isBlank(sdcId)) {
205209
alertHostSdcDisconnection(host);
@@ -209,6 +213,10 @@ public boolean grantAccess(DataObject dataObject, Host host, DataStore dataStore
209213
dataObject.getUuid(), host.getPrivateIpAddress()));
210214
}
211215

216+
if (!hostConnectedToPool) {
217+
connectHostToStoragePool(host, dataStore);
218+
}
219+
212220
if (DataObjectType.VOLUME.equals(dataObject.getType())) {
213221
final VolumeVO volume = volumeDao.findById(dataObject.getId());
214222
logger.debug("Granting access for PowerFlex volume: {} at path {}", volume, volume.getPath());
@@ -231,6 +239,15 @@ public boolean grantAccess(DataObject dataObject, Host host, DataStore dataStore
231239
}
232240
}
233241

242+
private void connectHostToStoragePool(Host host, DataStore dataStore) {
243+
try {
244+
logger.debug("Connecting host {} to PowerFlex storage pool {}", host, dataStore);
245+
storageMgr.connectHostToSharedPool(host, dataStore.getId());
246+
} catch (Exception e) {
247+
throw new CloudRuntimeException(String.format("Failed to connect host %s to PowerFlex storage pool %s due to %s", host, dataStore, e.getMessage()), e);
248+
}
249+
}
250+
234251
private boolean grantAccess(DataObject dataObject, EndPoint ep, DataStore dataStore) {
235252
Host host = hostDao.findById(ep.getId());
236253
return grantAccess(dataObject, host, dataStore);
@@ -1522,6 +1539,11 @@ public boolean canHostPrepareStoragePoolAccess(Host host, StoragePool pool) {
15221539
return false;
15231540
}
15241541

1542+
if (!Hypervisor.HypervisorType.KVM.equals(host.getHypervisorType())) {
1543+
logger.debug("Host {} cannot prepare access to PowerFlex storage pool {}, unsupported hypervisor type: {}", host, pool, host.getHypervisorType());
1544+
return false;
1545+
}
1546+
15251547
sdcManager = ComponentContext.inject(sdcManager);
15261548
return sdcManager.areSDCConnectionsWithinLimit(pool.getId());
15271549
}

‎plugins/storage/volume/scaleio/src/test/java/org/apache/cloudstack/storage/datastore/driver/ScaleIOPrimaryDataStoreDriverTest.java‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
import com.cloud.host.Host;
3131
import com.cloud.host.HostVO;
3232
import com.cloud.host.dao.HostDao;
33+
import com.cloud.hypervisor.Hypervisor;
3334
import com.cloud.storage.Storage;
35+
import com.cloud.storage.StoragePool;
3436
import com.cloud.storage.Volume;
3537
import com.cloud.storage.VolumeVO;
3638
import com.cloud.storage.dao.VolumeDao;
@@ -597,4 +599,18 @@ public void testGetVolumeSizeRequiredOnPool() {
597599
16L * (1024 * 1024 * 1024),
598600
true));
599601
}
602+
603+
@Test
604+
public void testCanHostPrepareStoragePoolAccessWithNullArguments() {
605+
Assert.assertFalse(scaleIOPrimaryDataStoreDriver.canHostPrepareStoragePoolAccess(null, Mockito.mock(StoragePool.class)));
606+
Assert.assertFalse(scaleIOPrimaryDataStoreDriver.canHostPrepareStoragePoolAccess(Mockito.mock(Host.class), null));
607+
}
608+
609+
@Test
610+
public void testCanHostPrepareStoragePoolAccessWithUnsupportedHypervisorType() {
611+
Host host = Mockito.mock(Host.class);
612+
when(host.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.VMware);
613+
614+
Assert.assertFalse(scaleIOPrimaryDataStoreDriver.canHostPrepareStoragePoolAccess(host, Mockito.mock(StoragePool.class)));
615+
}
600616
}

‎server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java‎

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,12 @@
113113
import com.cloud.storage.ScopeType;
114114
import com.cloud.storage.StorageManager;
115115
import com.cloud.storage.StoragePool;
116-
import com.cloud.storage.StoragePoolHostVO;
117116
import com.cloud.storage.VMTemplateVO;
118117
import com.cloud.storage.Volume;
119118
import com.cloud.storage.VolumeVO;
120119
import com.cloud.storage.dao.DiskOfferingDao;
121120
import com.cloud.storage.dao.GuestOSCategoryDao;
122121
import com.cloud.storage.dao.GuestOSDao;
123-
import com.cloud.storage.dao.StoragePoolHostDao;
124122
import com.cloud.storage.dao.VMTemplateDao;
125123
import com.cloud.storage.dao.VolumeDao;
126124
import com.cloud.template.VirtualMachineTemplate;
@@ -227,8 +225,6 @@ public void setHostAllocators(List<HostAllocator> hostAllocators) {
227225
protected GuestOSCategoryDao _guestOSCategoryDao = null;
228226
@Inject
229227
protected DiskOfferingDao _diskOfferingDao;
230-
@Inject
231-
protected StoragePoolHostDao _poolHostDao;
232228

233229
@Inject
234230
protected VolumeDao _volsDao;
@@ -1667,31 +1663,7 @@ public boolean checkAffinity(Host potentialHost, List<Long> preferredHosts) {
16671663
}
16681664

16691665
protected boolean hostCanAccessSPool(Host host, StoragePool pool) {
1670-
if (!_storageMgr.checkIfHostAndStoragePoolHasCommonStorageAccessGroups(host, pool)) {
1671-
if (logger.isDebugEnabled()) {
1672-
logger.debug(String.format("StoragePool %s and host %s does not have matching storage access groups", pool, host));
1673-
}
1674-
return false;
1675-
}
1676-
1677-
boolean hostCanAccessSPool = false;
1678-
1679-
StoragePoolHostVO hostPoolLinkage = _poolHostDao.findByPoolHost(pool.getId(), host.getId());
1680-
if (hostPoolLinkage != null && _storageMgr.canHostAccessStoragePool(host, pool)) {
1681-
hostCanAccessSPool = true;
1682-
}
1683-
1684-
logger.debug("Host: {}{} access pool: {}", host, hostCanAccessSPool ? " can" : " cannot", pool);
1685-
if (!hostCanAccessSPool) {
1686-
if (_storageMgr.canHostPrepareStoragePoolAccess(host, pool)) {
1687-
logger.debug("Host: {} can prepare access to pool: {}", host, pool);
1688-
hostCanAccessSPool = true;
1689-
} else {
1690-
logger.debug("Host: {} cannot prepare access to pool: {}", host, pool);
1691-
}
1692-
}
1693-
1694-
return hostCanAccessSPool;
1666+
return _storageMgr.canHostAccessOrPrepareStoragePool(host, pool);
16951667
}
16961668

16971669
protected List<Host> findSuitableHosts(VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {

0 commit comments

Comments
 (0)