slavkap opened a new pull request, #9478:
URL: https://github.com/apache/cloudstack/pull/9478

   ### Description
   
   This PR allows copying a snapshot from a primary storage pool in one zone to 
a primary storage pool in different zones without involving secondary storage.
   This feature is currently implemented only in the StorPool storage plugin. 
Other storage plugins can add this feature if the storage pools support direct 
copies of snapshots from one pool to another.
   
   Added additional API param `usestoragereplication` and one more for Admin 
users `storageids` in CloudStack API calls:
   
   > createSnapshot
   > copySnapshot
   > createSnapshotPolicy
   
   The option `snapshot.backup.to.secondary` does not apply to the copy 
functionality. The snapshots will be copied only to the required primary 
storage in a different zone.
   The user can create volumes/templates from the copied snapshots. The user 
can make copies only to a primary or to a secondary storage - at the moment, 
there is no option to do the copy on both.
   
   The destination zone is a mandatory parameter if the users want to copy a 
snapshot, and the `usestoragereplication` if the copy has to be on the primary 
storage
   
   For Admin users:
   Those users can define the primary destination storage for the copy or to 
enable the setting `use.storage.replication` in the Primary storage settings.
   
![image](https://github.com/user-attachments/assets/3d0a7a57-9e06-4ef2-a37f-392333cf1dc7)
   
![image](https://github.com/user-attachments/assets/40f0f85f-e4c9-4265-a079-02b958ae6a68)
   
![image](https://github.com/user-attachments/assets/6f9719f0-268d-42bf-a71f-af8a45c0bdb9)
   
   For regular Users:
   The Admin should enable the configuration setting `use.storage.replication` 
in the Primary storage settings.
   
![image](https://github.com/user-attachments/assets/03bb99c0-8beb-4f3b-b671-5126763d7894)
   
![image](https://github.com/user-attachments/assets/95cb29bf-28cb-4ed7-875d-6510209746bc)
   
![image](https://github.com/user-attachments/assets/7ce381f8-0bad-4cf5-98d7-97f37367044a)
   
   
   
   For other storage plugins that want to adopt this functionality:
   - The Primary storage driver should have the capability 
`CAN_COPY_SNAPSHOT_BETWEEN_ZONES`
   - the respective plugin needs to implement the `copySnapshot` method in 
their SnapshotStrategy and that the driver can handle the COPY operation
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [X] 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
   
   - [X] Major
   - [ ] Minor
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   Manual and smoke tests with StorPool primary storage on multiple zones
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to