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 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, taken NAS backup to NFS NAS backup repo and the restored the NAS backed-up disks back to the instance (both disks to Ceph storage pool); and restore & attach backed up volume (on Ceph) to a new instance.

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 0.74627% with 133 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.39%. Comparing base (0108ffd) to head (93108c3).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ce/wrapper/LibvirtRestoreBackupCommandWrapper.java 0.00% 93 Missing ⚠️
...rg/apache/cloudstack/backup/NASBackupProvider.java 0.00% 28 Missing ⚠️
...apache/cloudstack/backup/RestoreBackupCommand.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.39%   17.39%   -0.01%     
  Complexity    15283    15283              
============================================
  Files          5889     5889              
  Lines        526183   526287     +104     
  Branches      64242    64254      +12     
============================================
  Hits          91541    91541              
- Misses       424298   424401     +103     
- Partials      10344    10345       +1     
Flag Coverage Δ
uitests 3.62% <ø> (ø)
unittests 18.43% <0.74%> (-0.01%) ⬇️

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

@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

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.

3 participants