Add mountopts to backup repository response#12360
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12360 +/- ##
=========================================
Coverage 17.59% 17.59%
- Complexity 15597 15599 +2
=========================================
Files 5910 5910
Lines 529618 529626 +8
Branches 64708 64709 +1
=========================================
+ Hits 93197 93204 +7
Misses 425930 425930
- Partials 10491 10492 +1
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:
|
There was a problem hiding this comment.
Pull request overview
This PR adds the mountopts field to the backup repository API response, fixing issue #12359 where mount options would disappear from the UI after saving even though they were persisted in the database.
- Added
mountOptionsfield toBackupRepositoryResponsewith appropriate serialization and getter/setter methods - Updated
ApiResponseHelper.createBackupRepositoryResponse()to populate the mount options from the repository entity - Minor formatting cleanup in
BackupRepositoryServiceinterface (removed trailing blank line)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| api/src/main/java/org/apache/cloudstack/api/response/BackupRepositoryResponse.java | Added mountOptions field with serialization annotation, getter and setter methods to expose mount options in API responses |
| server/src/main/java/com/cloud/api/ApiResponseHelper.java | Updated createBackupRepositoryResponse method to set mount options from the BackupRepository entity |
| api/src/main/java/org/apache/cloudstack/backup/BackupRepositoryService.java | Removed trailing blank line (formatting cleanup) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
72fd23e to
3aba1ce
Compare
|
@blueorangutan package |
|
@sureshanaparti 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 16225 |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-15108)
|
abh1sar
left a comment
There was a problem hiding this comment.
Tested. LGTM.
- Set the mount opts during create repository -> mountopts being used correctly in the mount during backup
10.0.32.4:/acs/primary/ref-trl-10536-k-Mol9-abhisar-sinha/ref-trl-10536-k-Mol9-abhisar-sinha-kvm-pri1 on /tmp/csbackup.c3IDY type nfs4 (rw,relatime,sync,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,noac,proto=tcp,nconnect=4,timeo=600,retrans=2,sec=sys,clientaddr=10.0.32.113,local_lock=none,addr=10.0.32.4)
- Changed the mount opts (nconnect=8) -> mountopts being used correctly in the mount during backup
10.0.32.4:/acs/primary/ref-trl-10536-k-Mol9-abhisar-sinha/ref-trl-10536-k-Mol9-abhisar-sinha-kvm-pri1 on /tmp/csbackup.EoGmj type nfs4 (rw,relatime,sync,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,noac,proto=tcp,nconnect=8,timeo=600,retrans=2,sec=sys,clientaddr=10.0.32.113,local_lock=none,addr=10.0.32.4)
-
Checked mount opts are being used correctly during full restore
10.0.32.4:/acs/primary/ref-trl-10536-k-Mol9-abhisar-sinha/ref-trl-10536-k-Mol9-abhisar-sinha-kvm-pri1 on /usr/share/cloudstack-agent/tmp/csbackup.HouUU7428362768353569352 type nfs4 (rw,relatime,sync,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,noac,proto=tcp,nconnect=8,timeo=600,retrans=2,sec=sys,clientaddr=10.0.32.113,local_lock=none,addr=10.0.32.4) -
Checked mount opts are being used correctly in Restore and attach single volume
10.0.32.4:/acs/primary/ref-trl-10536-k-Mol9-abhisar-sinha/ref-trl-10536-k-Mol9-abhisar-sinha-kvm-pri1 on /usr/share/cloudstack-agent/tmp/csbackup.gvuAt8261481144545061143 type nfs4 (rw,relatime,sync,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,noac,proto=tcp,nconnect=8,timeo=600,retrans=2,sec=sys,clientaddr=10.0.32.113,local_lock=none,addr=10.0.32.4) -
Checked blank mount opts are displayed properly without any error
Description
This PR add mountopts to backup repository response.
Fixes #12359
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Updated the mount options for the backup repository and re-open on the edit and update mount options again.
BEFORE CHANGES:
AFTER CHANGES:
How did you try to break this feature and the system with this change?