Support timeout configuration for Create and Restore NAS backup#12964
Support timeout configuration for Create and Restore NAS backup#12964sureshanaparti merged 4 commits intoapache:4.22from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12964 +/- ##
=========================================
Coverage 17.60% 17.60%
- Complexity 15674 15677 +3
=========================================
Files 5918 5918
Lines 531727 531728 +1
Branches 65016 65018 +2
=========================================
+ Hits 93595 93614 +19
+ Misses 427570 427552 -18
Partials 10562 10562
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 |
|
@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
| @@ -211,6 +212,7 @@ public Pair<Boolean, Backup> takeBackup(final VirtualMachine vm, Boolean quiesce | |||
| command.setBackupRepoAddress(backupRepository.getAddress()); | |||
| command.setMountOptions(backupRepository.getMountOptions()); | |||
| command.setQuiesce(quiesceVM); | |||
| command.setTimeout(NASBackupCreateBackupTimeout.value()); | |||
There was a problem hiding this comment.
@abh1sar can this be addressed with the value 'TakeBackupCommand=14400' in commands.timeout global config? if so, we can document it and skip this new timeout config?
There was a problem hiding this comment.
Thanks @sureshanaparti . I'll test with commands.timeout and update
There was a problem hiding this comment.
@sureshanaparti made the change to use commands.timeout. default value is taken from libvirtComputingResource.getCmdsTimeout() if commands.timeout is not set, as before.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17365 |
|
@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. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a configurable timeout for KVM NAS backup/restore operations by deriving a per-command timeout (with fallback to the agent default), and updates unit tests accordingly.
Changes:
- Compute an effective timeout from
command.getWait()(fallback tocmds.timeout) forTakeBackupCommand. - Apply the same effective timeout strategy to restore flows and propagate it to
rsyncandqemu-imgexecution. - Adjust
LibvirtRestoreBackupCommandWrapperTeststatic script stubbing to better simulatersyncoutcomes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java | Uses per-command timeout (from wait) when executing piped backup commands. |
| plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapper.java | Applies per-command timeout to rsync and qemu-img restore operations. |
| plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java | Updates script mocks to model different exit codes (e.g., rsync failure) and simplifies one test’s stubbing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java
Show resolved
Hide resolved
...src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java
Show resolved
Hide resolved
.../main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapper.java
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Show resolved
Hide resolved
...t/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapperTest.java
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17382 |
|
@blueorangutan test |
|
@abh1sar a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
[SF] Trillian test result (tid-15823)
|
|
@blueorangutan package |
|
@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 17415 |
Description
Create and Restore NAS backup used to take the timeout configuration set via "commands.timeout" config or the default
cmds.timeout(7200s) in agent.properties.This might not be enough for large images and slow networks.
Eg. the config "commands.timeout" can be set to "RestoreBackupCommand=14400, TakeBackupCommand=14400"
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?