-
Notifications
You must be signed in to change notification settings - Fork 1.2k
NAS backup provider: Support backup and restore with Shared mount point primary storage. #11204
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11204 +/- ##
==========================================
Coverage 16.15% 16.15%
+ Complexity 13277 13273 -4
==========================================
Files 5657 5656 -1
Lines 497939 497730 -209
Branches 60386 60361 -25
==========================================
- Hits 80443 80418 -25
+ Misses 408532 408361 -171
+ Partials 8964 8951 -13
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:
|
@blueorangutan package |
@DaanHoogland 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 ✔️ debian ✔️ suse15. SL-JID 14195 |
@blueorangutan test keepEnv |
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13788)
|
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.
LGTM.
Tested with sharedmountpoint on KVM. Instance backup,restore on NAS Repos are working fine.
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.
clgtm
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 enhances the NAS backup provider to support backup and restore operations for volumes hosted on Shared mount point primary storage. The change addresses issues with volume path resolution when using different storage pool types.
- Adds support for SharedMountPoint storage pool type in volume path calculation
- Restructures the conditional logic to handle multiple storage pool types appropriately
- Uses the storage pool's path directly for SharedMountPoint storage pools instead of the default UUID-based path
@@ -246,9 +246,13 @@ private List<String> getVolumePaths(List<VolumeVO> volumes) { | |||
if (Objects.isNull(storagePool)) { | |||
throw new CloudRuntimeException("Unable to find storage pool associated to the volume"); | |||
} | |||
String volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid()); | |||
String volumePathPrefix; |
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.
[nitpick] Consider initializing volumePathPrefix with a default value or restructuring the logic to avoid uninitialized variable concerns. While the current logic covers all cases, explicit initialization would improve code clarity.
String volumePathPrefix; | |
String volumePathPrefix = ""; |
Copilot uses AI. Check for mistakes.
Description
This PR fixes #11117 and #11118 by handling backup and restore when volumes are hosted on Shared mount point.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested backup and restore with volumes on a Shared mount point storage backed by NFS.
How did you try to break this feature and the system with this change?