You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5c24780
Browse filesBrowse the repository at this point in the historyBrowse files
CSTACKEX-306: support for create CS colume from CS snapshot on the lo… (#107)
1. CS volume can be created from CS-volume snapshot only, it will not be
supported with VM level snapshot
2. type of CS volume would be data for both Root and Data CS
volume-snapshot.
3. Cloudstack will not create bootable root type of volume with this
usecase support. User is recommended to to use create template from the
root volume and take it forward to create new bootable root volumes.
4. create CS volume would be residing on the same primary storage pool.
cloudstack does not provide any option to user to choose the destination
storage-pool.
<!---
*******************************************************************************
-->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE
DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!---
*******************************************************************************
-->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [x] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
Test cases
1. tested by creating volumes for ROOT & DATA volume snapshots
2. tested by creating volumes and attaching them with VM, for ROOT &
DATA volume snapshots
3. Tried creating template as well from Root CS volume snapshot and
working finw reer below 3rd acreenshot
list of snapshot as below
<img width="1440" height="281" alt="image"
src="https://github.com/user-attachments/assets/ab3f6d5f-d6ea-4203-a748-1c46802250f1"
/>
And list of created volumes from those snapshots, refer by the names of
the snapshots
<img width="1433" height="476" alt="image"
src="https://github.com/user-attachments/assets/7cf66c07-4c3d-4347-8efb-605bff3fb4e2"
/>
<img width="1407" height="259" alt="image"
src="https://github.com/user-attachments/assets/daf0f6e7-c161-4c7f-b2b3-d8d2b12964cf"
/>
logger.warn("Unable to mark template {} as failed on primary storage {}: {}", templateOnPrimary.getImage(), destPrimaryDataStore, stateEx.getMessage());
Copy file name to clipboardExpand all lines: plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java
Copy file name to clipboardExpand all lines: plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/FileCloneRequest.java
+53-1Lines changed: 53 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,15 @@ public class FileCloneRequest {
46
46
@JsonProperty("overwrite_destination")
47
47
privateBooleanoverwriteDestination;
48
48
49
+
/**
50
+
* Optional FlexVolume snapshot to clone from. When set, ONTAP clones {@code source_path}
51
+
* as it existed in that snapshot rather than from the live file/LUN.
52
+
*
53
+
* <p>Used by create-volume-from-snapshot (same FlexVol). Omitted for live template-cache clones.</p>
logger.error("enableLogicalAccess: Failed to fetch LunMap details for Lun: {} and igroup: {}. LunMap response is null or empty.", lunName, igroupName);
618
-
thrownewCloudRuntimeException("Failed to fetch LunMap details for Lun: " + lunName + " and igroup: " + igroupName);
618
+
logger.error("enableLogicalAccess: Failed to fetch LunMap poolDetails for Lun: {} and igroup: {}. LunMap response is null or empty.", lunName, igroupName);
619
+
thrownewCloudRuntimeException("Failed to fetch LunMap poolDetails for Lun: " + lunName + " and igroup: " + igroupName);
619
620
}
620
621
} catch (Exceptione) {
621
-
logger.error("enableLogicalAccess: Failed to fetch LunMap details for Lun: {} and igroup: {}, Exception: {}", lunName, igroupName, e);
622
-
thrownewCloudRuntimeException("Failed to fetch LunMap details for Lun: " + lunName + " and igroup: " + igroupName);
622
+
logger.error("enableLogicalAccess: Failed to fetch LunMap poolDetails for Lun: {} and igroup: {}, Exception: {}", lunName, igroupName, e);
623
+
thrownewCloudRuntimeException("Failed to fetch LunMap poolDetails for Lun: " + lunName + " and igroup: " + igroupName);
623
624
}
624
625
logger.trace("enableLogicalAccess: LunMap created successfully, LunMap: {}", lunMapResponse.getRecords().get(0));
Copy file name to clipboardExpand all lines: plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/model/CloudStackVolume.java
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,12 @@ public class CloudStackVolume {
51
51
*/
52
52
privateStringdestinationPath;
53
53
54
+
/**
55
+
* ONTAP FlexVolume snapshot name when cloning a new file/LUN from a snapshot
56
+
* (create-volume-from-snapshot). Null for live clones (e.g. template cache).
57
+
*/
58
+
privateStringsnapshotName;
59
+
54
60
privateDataObjectvolumeInfo; // This is needed as we need DataObject to be passed to agent to create volume
55
61
56
62
publicFileInfogetFile() {
@@ -101,4 +107,12 @@ public void setDestinationPath(String destinationPath) {
0 commit comments