NAS backup provider: Support backup and restore with Shared mount point primary storage.#11204
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)
|
rajujith
left a comment
There was a problem hiding this comment.
LGTM.
Tested with sharedmountpoint on KVM. Instance backup,restore on NAS Repos are working fine.
There was a problem hiding this comment.
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
| 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.
[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 = ""; |
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?