Fix repository mount failure during restore due to path format handling#12778
Fix repository mount failure during restore due to path format handling#12778harikrishna-patnala wants to merge 2 commits into
Conversation
|
@blueorangutan package |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12778 +/- ##
=========================================
Coverage 17.67% 17.67%
+ Complexity 15792 15789 -3
=========================================
Files 5922 5922
Lines 533123 533136 +13
Branches 65201 65201
=========================================
+ Hits 94246 94253 +7
- Misses 428236 428238 +2
- Partials 10641 10645 +4
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:
|
|
did you mean that the issue is because executePipedCommands and runSimpleBashScriptForExitValue work differently ? @harikrishna-patnala |
Yes @weizhouapache I did not tested them separately but based on the issue reported, backup operation was successful with the repository address having back slashes (\). So I followed the same execution method in restore operation as well. |
|
@blueorangutan package |
|
@harikrishna-patnala 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 17064 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-15592) |
|
@blueorangutan test |
|
@harikrishna-patnala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-15593)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@harikrishna-patnala can you fix the conflicts here. thanks. |
Restore could fail when the backup repository address was specified in formats such as \\server\share. The restore logic built a raw shell command which caused backslashes to be interpreted as escape characters, resulting in an invalid mount path. Execute the mount command using Script.executePipedCommands() so the repository path is passed as an argument instead of being embedded in a shell command string.
c7aa780 to
7af5fc0
Compare
|
@blueorangutan package |
|
@harikrishna-patnala 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 17902 |
Description
This PR addresses an issue mentioned here #12669
Here we are addressing the mount operation to be same as it does during backup
https://github.com/shapeblue/cloudstack/blob/b7a11cb203aeb9458460e3ce06090172b3a814d1/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java#L71-L84
Types of changes
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?