Skip to content

Commit 5348e78

Browse files
CSTACKEX-198: removing unwanted flags from file clone also
1 parent ea401ce commit 5348e78

3 files changed

Lines changed: 1 addition & 14 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,6 @@ public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCm
688688
fileCloneRequest.setVolume(volumeRef);
689689
fileCloneRequest.setSourcePath(volumePath);
690690
fileCloneRequest.setDestinationPath(cloneName);
691-
fileCloneRequest.setIsOverride(Boolean.FALSE);
692691
logger.info("takeSnapshot: Creating NFS file clone [{}] from source [{}] on FlexVol UUID [{}]",
693692
cloneName, volumePath, flexVolUuid);
694693
nfsJobResponse = storageStrategy.getNasFeignClient().cloneFile(authHeader, fileCloneRequest);

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/FileCloneRequest.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ public class FileCloneRequest {
3232
@JsonProperty("destination_path")
3333
private String destinationPath;
3434

35-
@JsonProperty("is_override")
36-
private Boolean isOverride;
37-
3835
public VolumeRef getVolume() {
3936
return volume;
4037
}
@@ -59,14 +56,6 @@ public void setDestinationPath(String destinationPath) {
5956
this.destinationPath = destinationPath;
6057
}
6158

62-
public Boolean getIsOverride() {
63-
return isOverride;
64-
}
65-
66-
public void setIsOverride(Boolean isOverride) {
67-
this.isOverride = isOverride;
68-
}
69-
7059
@JsonInclude(JsonInclude.Include.NON_NULL)
7160
public static class VolumeRef {
7261
@JsonProperty("name")

plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/vmsnapshot/OntapVMSnapshotStrategy.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ public VMSnapshot takeVMSnapshot(VMSnapshot vmSnapshot) {
393393
cloneRequest.setVolume(volumeRef);
394394
cloneRequest.setSourcePath(volumePath);
395395
cloneRequest.setDestinationPath(cloneName);
396-
cloneRequest.setIsOverride(Boolean.FALSE);
397396
JobResponse fileJobResponse = storageStrategy.getNasFeignClient().cloneFile(authHeader, cloneRequest);
398397
if (fileJobResponse == null || fileJobResponse.getJob() == null) {
399398
throw new CloudRuntimeException("Failed to submit clone-backed VM snapshot for volume " + volumeId);
@@ -639,7 +638,7 @@ public boolean revertVMSnapshot(VMSnapshot vmSnapshot) {
639638
userVm.getUuid(), vmSnapshotTO, volumeTOs, guestOS.getDisplayName());
640639

641640
// Revert clone-backed snapshot artifacts per volume:
642-
// - NFS: cloneFile(source=clone, destination=live file, isOverride=true)
641+
// - NFS: patch file(source=clone, destination=live file, overwrite=true)
643642
// - iSCSI: patch LUN (clone.source=clone LUN, destination=live LUN)
644643
List<VMSnapshotDetailsVO> cloneDetails = vmSnapshotDetailsDao.findDetails(vmSnapshot.getId(), OntapStorageConstants.ONTAP_FLEXVOL_SNAPSHOT);
645644
if (CollectionUtils.isNotEmpty(cloneDetails)) {

0 commit comments

Comments
 (0)