Skip to content

Commit a10981a

Browse files
Gupta, SuryaGupta, Surya
authored andcommitted
CSTACKEX-46 Testing: Added debug log
1 parent cd87640 commit a10981a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,13 @@ public boolean attachCluster(DataStore dataStore, ClusterScope scope) {
280280
}
281281
//TODO - check if no host to connect then also need to create access group without initiators
282282
if (hostsIdentifier != null && hostsIdentifier.size() > 0) {
283-
AccessGroup accessGroupRequest = createAccessGroupRequestByProtocol(storagePool, scope.getScopeId(), details, hostsIdentifier);
284-
strategy.createAccessGroup(accessGroupRequest);
283+
try {
284+
AccessGroup accessGroupRequest = createAccessGroupRequestByProtocol(storagePool, scope.getScopeId(), details, hostsIdentifier);
285+
strategy.createAccessGroup(accessGroupRequest);
286+
} catch (Exception e) {
287+
s_logger.error("attachCluster: Failed to create access group on storage system for cluster: " + primaryStore.getClusterId(), e);
288+
throw new CloudRuntimeException("attachCluster: Failed to create access group on storage system for cluster: " + primaryStore.getClusterId(), e);
289+
}
285290
}
286291
logger.debug("attachCluster: Attaching the pool to each of the host in the cluster: {}", primaryStore.getClusterId());
287292
for (HostVO host : hostsToConnect) {

0 commit comments

Comments
 (0)