-
Notifications
You must be signed in to change notification settings - Fork 1.2k
NAS B&R Plugin enhancements #9666
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
|
@blueorangutan package |
|
@Pearl1594 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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #9666 +/- ##
============================================
- Coverage 15.99% 15.98% -0.02%
- Complexity 13060 13084 +24
============================================
Files 5644 5649 +5
Lines 494915 495747 +832
Branches 59960 60029 +69
============================================
+ Hits 79173 79254 +81
- Misses 406910 407640 +730
- Partials 8832 8853 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11085 |
|
This looks like a bug fix on a new feature @Pearl1594 , should it go in 4.20? cc @JoaoJandre |
|
This isn't targeted for 4.20 @DaanHoogland. This PR is to improve aspects of the recently merged changes. There will be more changes added to this PR. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
8dadb49 to
343e7dc
Compare
|
@blueorangutan package |
|
@Pearl1594 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 11180 |
|
@Pearl1594 can you address conflicts and advise if this is ready for reviewing and testing. |
|
@blueorangutan package |
|
@Pearl1594 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 12412 |
|
@blueorangutan test |
|
@Pearl1594 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12376)
|
|
@Pearl1594 added some minor comments. Please check. |
|
@abh1sar sorry I don't see your review comments. |
abh1sar
left a comment
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.
Added some minor comments
| accountManager.checkAccess(CallContext.current().getCallingAccount(), null, true, vm); | ||
| public boolean deleteBackupSchedule(DeleteBackupScheduleCmd cmd) { | ||
| Long vmId = cmd.getVmId(); | ||
| Long id = cmd.getId(); |
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.
In DeleteBackupScheduleCmd, both vmId and id parameters are declared with required = true, but here it looks like either of them could be null.
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.
You're are right. I've addressed it.
| for (final Backup backup: backupDao.listByVmId(null, vm.getId())) { | ||
| vmBackupSize += backup.getSize(); | ||
| vmBackupProtectedSize += backup.getProtectedSize(); | ||
| if (Objects.nonNull(backup.getSize())) { |
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.
can these be null?
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.
I am not sure - but just added a defensive check
| dest="$mount_point/${BACKUP_DIR}" | ||
| mount -t ${NAS_TYPE} ${NAS_ADDRESS} ${mount_point} $([[ ! -z "${MOUNT_OPTS}" ]] && echo -o ${MOUNT_OPTS}) | ||
| if [ ${NAS_TYPE} == "cifs" ]; then | ||
| MOUNT_OPTS="${MOUNT_OPTS},nobrl" |
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.
nobrl is added in mountBackupDirectory. Is it required here as well?
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.
I had faced the following issue while backing up the VM:
# virsh -c qemu:///system backup-begin --domain i-2-10-VM --backupxml /tmp/csbackup.HEGID/i-2-10-VM/2024.10.07.02.44.28/backup.xml
error: operation failed: failed to format image: 'Could not write qcow2 header: Permission denied'
As per https://unix.stackexchange.com/questions/622194/how-to-use-qemu-kvm-virtual-machine-disk-image-on-smb-cifs-network-share-permis adding nobrl solved it - so I used that fix.
api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupScheduleCmd.java
Outdated
Show resolved
Hide resolved
…bkp schedule command
|
@blueorangutan package |
|
@Pearl1594 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 12602 |
|
@blueorangutan test |
|
@Pearl1594 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12505)
|
abh1sar
left a comment
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. didn't test.
|
Tested by @rajujith. |
* NAS B&R Plugin enhancements * Prevent printing mount opts which may include password by removing from response * revert marvin change * add sanity checks to validate minimum qemu and libvirt versions * check is user running script is part of libvirt group * revert changes of retore expunged VM * add code coverage ignore file * remove check * issue with listing schedules and add defensive checks * redirect logs to agent log file * add some more debugging * remove test file * prevent deletion of cks cluster when vms associated to a backup offering * delete all snapshot policies when bkp offering is disassociated from a VM * Fix `updateTemplatePermission` when the UI is set to a language other than English (apache#9766) * Fix updateTemplatePermission UI in non-english language * Improve fix --------- * Add nobrl in the mountopts for cifs file system * Fix restoration of VM / volumes with cifs * add cifs utils for el8 * add cifs-utils for ubuntu cloudstack-agent * syntax error * remove required constraint on both vmid and id params for the delete bkp schedule command
Description
This PR fixes small issues and adds minor improvements to the NAS B&R Plugin
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?