Skip to content

backup: skip the powered-off precondition for the NAS provider - #14094

Open
weizhouapache wants to merge 1 commit into
apache:mainfrom
weizhouapache:24-fix-vm-powerstate-nas-backup
Open

backup: skip the powered-off precondition for the NAS provider#14094
weizhouapache wants to merge 1 commit into
apache:mainfrom
weizhouapache:24-fix-vm-powerstate-nas-backup

Conversation

@weizhouapache

Copy link
Copy Markdown
Member

Description

Only KBOSS needs the powered-off check before restoreVolumeFromBackupAndAttachToVM.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Only KBOSS needs the powered-off check before restoreVolumeFromBackupAndAttachToVM.
Copilot AI lite review requested due to automatic review settings September 9, 2026 07:56
@weizhouapache

weizhouapache commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

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

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 19.78%. Comparing base (d87c804) to head (a23ef59).

Files with missing lines Patch % Lines
...rg/apache/cloudstack/backup/BackupManagerImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14094      +/-   ##
============================================
- Coverage     19.78%   19.78%   -0.01%     
+ Complexity    19995    19989       -6     
============================================
  Files          6371     6371              
  Lines        575909   575909              
  Branches      70509    70509              
============================================
- Hits         113950   113928      -22     
- Misses       449526   449550      +24     
+ Partials      12433    12431       -2     
Flag Coverage Δ
uitests 3.52% <ø> (ø)
unittests 21.05% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19167

@weizhouapache

Copy link
Copy Markdown
Member Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@JoaoJandre

Copy link
Copy Markdown
Contributor

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants