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.    For regular Users: The Admin should enable the configuration setting `use.storage.replication` in the Primary storage settings.    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