Skip to content

Commit d45cab2

Browse files
Gupta, SuryaGupta, Surya
authored andcommitted
CSTACKEX-16 Fix issue for takeSnapshot
1 parent e966223 commit d45cab2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public long getUsedIops(StoragePool storagePool) {
504504

505505
@Override
506506
public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCmdResult> callback) {
507-
s_logger.info("takeSnapshot: snapshot info ", snapshot.toString());
507+
s_logger.info("takeSnapshot: snapshot info {}", snapshot.toString());
508508
CreateCmdResult result;
509509
String snapshotId = null;
510510
long snapshotSize = 0L;
@@ -513,12 +513,12 @@ public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCm
513513
}
514514
try {
515515
VolumeInfo volumeInfo = snapshot.getBaseVolume();
516-
s_logger.info("takeSnapshot: volumeInfo: ", volumeInfo.toString());
516+
s_logger.info("takeSnapshot: volumeInfo: {}", volumeInfo.toString());
517517
VolumeVO volumeVO = volumeDao.findById(volumeInfo.getId());
518518
if (volumeVO == null) {
519519
throw new CloudRuntimeException("takeSnapshot: VolumeVO not found for id: " + volumeInfo.getId());
520520
}
521-
s_logger.info("takeSnapshot: volumeVO: ", volumeVO.toString());
521+
s_logger.info("takeSnapshot: volumeVO: {}", volumeVO.toString());
522522

523523
StoragePoolVO storagePool = storagePoolDao.findById(volumeVO.getPoolId());
524524
if(storagePool == null) {

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedSANStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public CloudStackVolume getCloudStackVolume(CloudStackVolume cloudStackVolumeReq
177177
String lunName = cloudStackVolumeRequest.getLun().getName();
178178
try {
179179
String authHeader = Utility.generateAuthHeader(storage.getUsername(), storage.getPassword());
180-
Map<String, Object> queryParams = Map.of(Constants.SVM_DOT_NAME, svmName, Constants.NAME, lunName);
180+
Map<String, Object> queryParams = Map.of(Constants.SVM_DOT_NAME, svmName, Constants.NAME, lunName, Constants.FIELDS, "space");
181181
OntapResponse<Lun> lunResponse = sanFeignClient.getLunResponse(authHeader, queryParams);
182182
if (lunResponse == null || lunResponse.getRecords() == null || lunResponse.getRecords().isEmpty()) {
183183
s_logger.warn("getCloudStackVolume: Lun '{}' on SVM '{}' not found. Returning null.", lunName, svmName);

0 commit comments

Comments
 (0)