Skip to content

Commit 516887e

Browse files
Gupta, SuryaGupta, Surya
authored andcommitted
CSTACKEX-16 Print Location Type
1 parent 11dc0cd commit 516887e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ public class StorageSystemSnapshotStrategy extends SnapshotStrategyBase {
112112
@Override
113113
public SnapshotInfo backupSnapshot(SnapshotInfo snapshotInfo) {
114114
logger.info("backupSnapshot snapshotInfo: {} ", snapshotInfo.toString());
115+
logger.info("backupSnapshot snapshotInfo.getLocationType(): {} ", snapshotInfo.getLocationType());
115116
Preconditions.checkArgument(snapshotInfo != null, "'snapshotInfo' cannot be 'null'.");
116117

117-
if (snapshotInfo.getLocationType() != Snapshot.LocationType.SECONDARY) {
118+
if (snapshotInfo.getLocationType() != null && snapshotInfo.getLocationType() != Snapshot.LocationType.SECONDARY) {
118119
markAsBackedUp((SnapshotObject)snapshotInfo);
119-
120120
return snapshotInfo;
121121
}
122122

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ public void copyAsync(DataObject srcData, DataObject destData, Host destHost, As
303303

304304
@Override
305305
public boolean canCopy(DataObject srcData, DataObject destData) {
306+
s_logger.info("canCopy: srcData: {}", srcData);
307+
s_logger.info("canCopy: destData: {}", destData);
306308
return true;
307309
}
308310

@@ -707,12 +709,9 @@ public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCm
707709
} catch (Exception ex) {
708710
s_logger.error("takeSnapshot: Failed due to ", ex);
709711
result = new CreateCmdResult(null, new CreateObjectAnswer(ex.toString()));
710-
711712
result.setResult(ex.toString());
712713
}
713-
714714
callback.complete(result);
715-
716715
}
717716

718717
private AccessGroup getAccessGroupRequestByProtocol(Map<String, String> poolDetails, String storagePoolUuid) {

0 commit comments

Comments
 (0)