-
Notifications
You must be signed in to change notification settings - Fork 1.2k
extensions: add sync, download functionalities #11814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #11814 +/- ##
============================================
+ Coverage 17.56% 17.69% +0.13%
- Complexity 15540 15765 +225
============================================
Files 5909 5925 +16
Lines 529045 530378 +1333
Branches 64615 64758 +143
============================================
+ Hits 92933 93865 +932
- Misses 425657 425928 +271
- Partials 10455 10585 +130
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This change introduces support for synchronizing extension files across management servers in a clustered environment. - Adds new syncExtension API to trigger synchronization for a selected extension. - Implements service to create .tgz archive of the extension directory or selected files. - Generates signed share URL with HMAC signature and expiry. - Sends DownloadAndSyncExtensionFilesCommand to peer management servers. - Handles archive download, staging, and extraction on receiver side. - Adds Sync Extension action in the UI Extensions view. - Updates events, logging, and cleanup of temporary share files. Refactors all filesystem related code to extensions framework layer. Checksum for extensions is now calculated and compared for all files in the extension directory. Signed-off-by: Abhishek Kumar <[email protected]>
af72efe to
d98ff4f
Compare
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
Signed-off-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15620 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds extension file synchronization and download capabilities across management servers. It introduces new components for managing extension file distribution, including archive creation, download mechanisms, and file validation.
- Extension sync functionality to propagate extension files across management servers
- Download API to retrieve extension archives via signed URLs
- New filesystem and share managers to handle extension file operations
Reviewed Changes
Copilot reviewed 73 out of 73 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ServerPropertiesUtil.java | New utility for reading server.properties with caching |
| HMACSignUtil.java | New utility for HMAC signature generation |
| ArchiveUtil.java | New utility for creating and extracting TGZ/ZIP archives |
| ExtensionsShareManager*.java | New manager and implementation for extension sync/download |
| ExtensionsFilesystemManager*.java | New manager for extension filesystem operations |
| ShareServlet.java | New servlet for serving shared files |
| ShareSignedUrlFilter.java | New filter for validating signed URLs |
| DigestHelper.java | Added method to deduce algorithm from checksum length |
| UploadManagerImpl.java | Refactored to use constants for base paths |
| DownloadManagerImpl.java | Refactored download logic to handle archives |
Comments suppressed due to low confidence (1)
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/template/DownloadManagerImpl.java:1
- Incorrect constant used. Should use BASE_MOUNT_DIR instead of BASE_EXTRACT_DIR for constructing the path to the snapshot file, as this is reading from mounted storage, not the extract directory.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...storage/server/src/main/java/org/apache/cloudstack/storage/template/DownloadManagerImpl.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15689 |
|
@blueorangutan test |
|
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@blueorangutan test |
|
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
@shwstppr , should we try this for 22.1? |
|
[SF] Trillian test result (tid-14796)
|
|
@DaanHoogland I think better to keep it for 4.23. New functionalities/APIs, especially share context for management servers. I would prefer them to go in a non-LTS release first |
Description
This change introduces support for:
Key changes:
extension.share.download.use.secondary.storagecan be used and set to true.extension.share.link.validity.intervalTypes of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
For Sync:

For Download:
How Has This Been Tested?
How did you try to break this feature and the system with this change?