Skip to content

Conversation

sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented Sep 19, 2025

Description

This PR adds support to restore from NAS backup to volumes on Ceph storage pool(s), and take backup for stopped instances with volumes on Ceph storage pool(s).

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?

  • Created an instance with ROOT and DATA disks on Ceph storage pool.
  • Take NAS backup (for running VM) to NFS NAS backup repo and the restored the NAS backed-up disks back to the instance (both disks to Ceph storage pool).
  • Restore & Attach backed up volume (on Ceph) to a new instance.
  • Take NAS backup for stopped VM.

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

Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 16.02564% with 131 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.50%. Comparing base (ec533cd) to head (ebd081a).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...ce/wrapper/LibvirtRestoreBackupCommandWrapper.java 25.80% 65 Missing and 4 partials ⚠️
...rg/apache/cloudstack/backup/NASBackupProvider.java 0.00% 30 Missing ⚠️
...ource/wrapper/LibvirtTakeBackupCommandWrapper.java 0.00% 14 Missing ⚠️
...apache/cloudstack/backup/RestoreBackupCommand.java 0.00% 6 Missing ⚠️
...rg/apache/cloudstack/backup/TakeBackupCommand.java 0.00% 6 Missing ⚠️
...java/org/apache/cloudstack/utils/qemu/QemuImg.java 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11684      +/-   ##
============================================
+ Coverage     17.42%   17.50%   +0.07%     
- Complexity    15336    15428      +92     
============================================
  Files          5892     5894       +2     
  Lines        526521   526967     +446     
  Branches      64293    64349      +56     
============================================
+ Hits          91767    92240     +473     
+ Misses       424401   424347      -54     
- Partials      10353    10380      +27     
Flag Coverage Δ
uitests 3.61% <ø> (ø)
unittests 18.56% <16.02%> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@sureshanaparti sureshanaparti force-pushed the support-restore-nas-backup-to-ceph branch from c0c17c5 to fbd982d Compare September 19, 2025 05:20
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the NAS backup provider to support restoring from NAS backups to Ceph (RBD) storage pools. The implementation adds new functionality to handle both file-based and RBD volume restoration using different approaches.

  • Adds RBD storage pool support to volume restoration from NAS backups
  • Implements qemu-img based conversion for RBD volumes instead of simple file copy
  • Adds XML-based disk attachment for RBD volumes to running VMs

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
QemuImg.java Adds skipTargetVolumeCreation flag to support qemu-img -n option for RBD conversion
LibvirtRestoreBackupCommandWrapper.java Core restoration logic with RBD-specific handling and XML generation
NASBackupProvider.java Updates volume path handling to support different storage pool types including RBD
RestoreBackupCommand.java Adds restoreVolumePools field to pass storage pool information
BackupManager.java Documentation update to list valid backup provider plugins

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sureshanaparti sureshanaparti changed the title Support restore from NAS backup to Ceph storage pool(s) NAS backup provider: Support restore from NAS backup to Ceph storage pool(s) Sep 19, 2025
@sureshanaparti sureshanaparti force-pushed the support-restore-nas-backup-to-ceph branch from fbd982d to 2c0473d Compare September 19, 2025 06:16
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@sureshanaparti sureshanaparti marked this pull request as ready for review September 19, 2025 08:31
@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 15098

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian test result (tid-14411)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 55519 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11684-t14411-kvm-ol8.zip
Smoke tests completed. 146 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_deploy_and_scale_kubernetes_cluster Failure 1.18 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 28.96 test_kubernetes_clusters.py

Copy link
Collaborator

@abh1sar abh1sar left a comment

Choose a reason for hiding this comment

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

LGTM

But, the changes might conflict with https://github.com/apache/cloudstack/pull/11560/files#diff-030191169dcb9e844dadce4947f97d73ce8de3aff004e36ec66927d94a9507a4 if it gets merged first. This will need some work then.

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@harikrishna-patnala harikrishna-patnala added this to the 4.22.0 milestone Sep 23, 2025
@blueorangutan
Copy link

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

@harikrishna-patnala
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@blueorangutan
Copy link

[SF] Trillian test result (tid-14433)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 51859 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11684-t14433-kvm-ol8.zip
Smoke tests completed. 147 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@sureshanaparti sureshanaparti force-pushed the support-restore-nas-backup-to-ceph branch from 8113584 to 1cc9e27 Compare September 26, 2025 07:53
@sureshanaparti sureshanaparti changed the title NAS backup provider: Support restore from NAS backup to Ceph storage pool(s) NAS backup provider: Support restore from NAS backup to volumes on Ceph storage pool(s), and take backup for stopped instances with volumes on Ceph storage pool(s) Sep 26, 2025
@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@sureshanaparti sureshanaparti changed the title NAS backup provider: Support restore from NAS backup to volumes on Ceph storage pool(s), and take backup for stopped instances with volumes on Ceph storage pool(s) NAS backup provider: Support restore from backup to volumes on Ceph storage pool(s), and take backup for stopped instances with volumes on Ceph storage pool(s) Sep 26, 2025
@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 15180

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@abh1sar
Copy link
Collaborator

abh1sar commented Sep 29, 2025

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@abh1sar abh1sar closed this Sep 29, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache CloudStack 4.22.0 Sep 29, 2025
@abh1sar abh1sar reopened this Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants