Create volume on a specified storage pool#12966
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12966 +/- ##
============================================
- Coverage 17.60% 17.60% -0.01%
+ Complexity 15676 15671 -5
============================================
Files 5918 5918
Lines 531667 531710 +43
Branches 65001 65011 +10
============================================
- Hits 93617 93594 -23
- Misses 427491 427557 +66
Partials 10559 10559
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 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 17378 |
There was a problem hiding this comment.
Pull request overview
This PR enhances CloudStack’s createVolume API to support creating a data volume directly on a specified primary storage pool (so it can reach Ready state without attaching to a VM), aimed at workflows like vmware2kvm migrations.
Changes:
- Adds a new
storageidparameter tocreateVolume. - Implements a new code path in
VolumeApiServiceImpl.createVolumeto create the volume on the requested primary storage pool viavolService.createVolumeAsync.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java | Adds a storageid branch that triggers backend volume creation on a specified primary store. |
| api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java | Introduces the storageid API parameter and a getter intended to enforce snapshot/storage mutual exclusivity. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
Outdated
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
Show resolved
Hide resolved
api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17384 |
Description
This PR adds support for creating volume on the specified storage pool in the Ready state.
This can be done without attaching the volume to any instance. This can be helpful with vmware2kvm scenarios.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Created volume using the
storageidparameter on an NFS storage pool.Verified that volume was in
Readystate with a qcow2 file created with the specified virtual size.How did you try to break this feature and the system with this change?