backup: remove the powered-off precondition for all backup providers - #14094
backup: remove the powered-off precondition for all backup providers#14094weizhouapache wants to merge 1 commit into
Conversation
|
This condition check was added in the KBOSS PR (#12758). I’m not sure why it was added to the providers (excluding KBOSS). I assume this is a typo and that it should apply to KBOSS only. Please correct me if I’m wrong. @JoaoJandre @winterhazel |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14094 +/- ##
======================================
Coverage 3.52% 3.52%
======================================
Files 487 487
Lines 41930 41930
Branches 7932 7932
======================================
Hits 1479 1479
Misses 40236 40236
Partials 215 215
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Updates the restore-volume workflow so the “VM must be powered off” precondition is enforced only for the KBOSS backup provider, allowing other providers (e.g., NAS) to restore/attach without requiring the VM to be powered off.
Changes:
- Inverts the provider guard so the power-off check applies only when the backup offering provider is KBOSS.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@blueorangutan package |
|
@weizhouapache 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19167 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
This was my error when cherry-picking the changes to main. The original branch I was working on had #7221 applied, which introduced this check for all providers. I thought it was there for a reason for other providers, so I just added an exception for KBOSS. You can just remove the condition as a whole. It does not make sense for KBOSS. I don't think the condition makes sense for any provider actually. |
|
[SF] Trillian test result (tid-16947)
|
a23ef59 to
b366a1e
Compare
@JoaoJandre |
|
@blueorangutan package |
|
@weizhouapache 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. |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
| throw new CloudRuntimeException("Failed to find Instance Backup Offering"); | ||
| } | ||
|
|
||
| if (!StringUtils.equals(KBOSS_BACKUP_PROVIDER, offering.getProvider()) && !VirtualMachine.PowerState.PowerOff.equals(vm.getPowerState())) { | ||
| throw new CloudRuntimeException(String.format("VM [%s] needs to be powered off to restore the volume [%s].", vm.getUuid(), backedUpVolumeUuid)); | ||
| } | ||
|
|
||
| BackupProvider backupProvider = getBackupProvider(offering.getProvider()); | ||
| VolumeVO backedUpVolume = volumeDao.findByUuidIncludingRemoved(backedUpVolumeUuid); | ||
| Pair<HostVO, StoragePoolVO> restoreInfo; |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19202 |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
| } | ||
|
|
||
| BackupProvider backupProvider = getBackupProvider(offering.getProvider()); | ||
| VolumeVO backedUpVolume = volumeDao.findByUuidIncludingRemoved(backedUpVolumeUuid); |
Description
This check is not needed.
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?