jmsperu commented on PR #12898: URL: https://github.com/apache/cloudstack/pull/12898#issuecomment-6372733216
Rebased on 4.22 now that #14194 (LINSTOR incremental nasbackup) has landed; the conflicts were all in that change's footprint. How the overlap was resolved: - `NASBackupProvider.decideChain`: the compression/encryption check runs first (either enabled in the zone means a legacy full backup), then the LINSTOR content-based check, then the checkpoint-capable check. So a LINSTOR VM in a zone with compression or encryption on takes a full backup like any other VM, and the content-based pull path is never asked to compress or encrypt. - `NASBackupProviderTest` and `LibvirtTakeBackupCommandWrapper` keep both sets of imports and tests. - `nasbackup.sh backup_stopped_vm`: the `qemu-img convert` line carries this PR's `-c` / `-r` options and ionice wrapper, with the upstream `exit 1` on failure. Three small fixes that came out of the rebase: 1. `encrypt_backup` and `verify_backup` failures used `return 1`, but the dispatcher at the bottom of the script does not check the function's return value, so the script could end with status 0 after a failed encryption or integrity check. Both now `exit 1` like every other failure path. 2. The pull-mode (content-based) path copies through libvirt's NBD export with `qemu-img create` and `rebase`, which have no rate option, and the push-mode blockjob throttle does not reach it either. When a bandwidth limit is configured the script now logs a warning that the pull-mode backup runs unthrottled rather than silently ignoring the setting. 3. The LINSTOR restore tests from #14194 look up `replaceBlockDeviceWithBackup` by reflection with the pre-change signature and let the qemu-img info probe fail; they now pass the key file parameter and see a plain qcow2 header like the other restore tests. Tests (offline, `-pl api,core,plugins/backup/nas,plugins/hypervisors/kvm`): NASBackupProviderTest 36/36, LibvirtRestoreBackupCommandWrapperTest 28/28, LibvirtTakeBackupCommandWrapperTest 18/18, LibvirtTakeBackupCommandWrapperEnhancementFlagsTest 5/5. https://claude.ai/code/session_01EUU5skTaj95LfpkSbrWhPN -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
