| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
… on RBD RBD erasure-coded pool support (apache#9808) added handling of the rbd_default_data_pool storage-pool detail to RBDStringBuilder (qemu-img path) and to createPhysicalDisk (blank volumes), but not to createDiskFromTemplateOnRBD. As a result, ROOT volumes created from a template via rados-java rbd.clone()/rbd.create() are created without a data pool: all of their data objects land in the (replicated) metadata pool instead of the erasure-coded data pool, defeating the point of EC and consuming ~3x raw space. Set rbd_default_data_pool on the Rados connection (before connect) in both the same-cluster clone/copy branch and the cross-cluster copy branch of createDiskFromTemplateOnRBD, using the destination pool's detail. librbd then honors it as the default data pool when the new image is created, so template-derived volumes get data_pool set, the same way blank volumes already do. Signed-off-by: Brad House <bhouse@nexthop.ai>
|
@DaanHoogland 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. |
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## 4.22 #13361 +/- ##
============================================
+ Coverage 17.91% 17.94% +0.02%
- Complexity 16109 16146 +37
============================================
Files 5928 5928
Lines 534964 535182 +218
Branches 65463 65497 +34
============================================
+ Hits 95865 96019 +154
- Misses 428191 428234 +43
- Partials 10908 10929 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18262 |
Sorry, something went wrong.
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Sorry, something went wrong.
|
[SF] Trillian test result (tid-16344)
|
Sorry, something went wrong.
There was a problem hiding this comment.
clgtm
Sorry, something went wrong.
|
@vladimirpetrov @sureshanaparti please make sure this gets into 4.22.2 |
Sorry, something went wrong.
Signed-off-by: Brad House <bhouse@nexthop.ai>
There was a problem hiding this comment.
code lgtm, I will apply the change, and run some tests to make sure no regression
Sorry, something went wrong.
|
@weizhouapache 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. |
Sorry, something went wrong.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19193 |
Sorry, something went wrong.
|
I didn't see any regressions in my testing. That said, I don't use RBD erasure code pools, so my testing doesn't cover that case. @bhouse-nexthop Have you tested this? If so, could you share the "rbd info" for the root and data volumes? @BryanMLima Would you mind reviewing and testing this? You added support for RBD erasure code pools in #9808. |
Sorry, something went wrong.
Sorry, something went wrong.
root@node1:~# rbd info vm-images-ec-meta/9c5c2996-666a-4814-848d-05ac5f26f722 rbd image '9c5c2996-666a-4814-848d-05ac5f26f722': size 20 GiB in 5120 objects order 22 (4 MiB objects) snapshot_count: 0 id: 1558c5c328f8fa data_pool: vm-images-ec block_name_prefix: rbd_data.17.1558c5c328f8fa format: 2 features: layering, exclusive-lock, object-map, fast-diff, deep-flatten, data-pool op_features: flags: create_timestamp: Fri Sep 11 12:31:04 2026 access_timestamp: Fri Sep 11 12:31:04 2026 modify_timestamp: Fri Sep 11 12:31:04 2026 parent: vm-images-ec-meta/ba450ca9-8259-4351-90f3-234932d860f2@cloudstack-base-snap overlap: 3.5 GiB Note the data_pool entry |
Sorry, something went wrong.
cool, I will verify too |
Sorry, something went wrong.
tested ok # rbd info ecpool-metadata/70ad5892-d489-42bf-8215-56dabd36eda8 ... data_pool: ecpool ... features: layering, exclusive-lock, object-map, fast-diff, deep-flatten, data-pool ... |
Sorry, something went wrong.
|
merging on approvals and manual/smoke test |
Sorry, something went wrong.
… on RBD (apache#13361) RBD erasure-coded pool support (apache#9808) added handling of the rbd_default_data_pool storage-pool detail to RBDStringBuilder (qemu-img path) and to createPhysicalDisk (blank volumes), but not to createDiskFromTemplateOnRBD. As a result, ROOT volumes created from a template via rados-java rbd.clone()/rbd.create() are created without a data pool: all of their data objects land in the (replicated) metadata pool instead of the erasure-coded data pool, defeating the point of EC and consuming ~3x raw space. Set rbd_default_data_pool on the Rados connection (before connect) in both the same-cluster clone/copy branch and the cross-cluster copy branch of createDiskFromTemplateOnRBD, using the destination pool's detail. librbd then honors it as the default data pool when the new image is created, so template-derived volumes get data_pool set, the same way blank volumes already do.
* origin/main: (156 commits) Upgrade Netris SDK version to 1.1.0 since 24.0 (apache#14365) feature: instance boot group and readiness rules (apache#13907) dont show unathorized notification for prelogin (apache#14054) .github: Upgrade docker/login-action to fix ASF Allowlist failure (apache#14276) virtual router: Add route-maps to BGP peers for Routed Mode (apache#9964) Add pre-commit hook to validate dependabot.yml (apache#14107) Add the ASF Allowlist check workflow (apache#14113) Revert "VMware to KVM: cold (VDDK) and warm (CBT) migration into Ceph/RBD and Linstor, plus importVm adoption of existing RBD root volumes and Linstor root/data volumes (apache#13656)" VMware to KVM: cold (VDDK) and warm (CBT) migration into Ceph/RBD and Linstor, plus importVm adoption of existing RBD root volumes and Linstor root/data volumes (apache#13656) engine-schema: upgrade path for 24.0.0 (apache#14033) xenserver/xcpng: do not bypass secondary storage when copy volumes between pools (apache#13750) backport: Incremental NAS backup support for KVM (apache#13074) (apache#13877) storage: KVM - enable RBD/Ceph volume encryption support (apache#13556) backup: remove the powered-off precondition for all backup providers (apache#14094) Nas backup: Fix mount/unmount error handling and timeout in LibvirtRestoreBackupCommandWrapper (apache#14006) kvm: apply rbd_default_data_pool when creating volumes from templates on RBD (apache#13361) server: copy template details to vm instance details when import VM (apache#12793) marvin: use pycryptodome instead of PyCrypt (apache#13594) Packaging: accept normalized Marvin archive names (apache#13793) SharedFS: fix NPE when accessing systemvm templates for unsupported hypervisors (apache#13930) ...
|
Hi @weizhouapache ! |
Sorry, something went wrong.
This only affects creation of rbd images as the data pool is stored on those. you've got to do a migration using normal ceph utilities for the data pool unfortunately. We had to do that ourselves for a few hundred images, which does require a restart and a few minute outage per vm :/ |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
RBD erasure-coded (EC) pool support (#9808) taught the KVM agent to honor the rbd_default_data_pool storage-pool detail, but only in two places:
It was not applied to createDiskFromTemplateOnRBD(), which creates ROOT volumes from a template using rados-java (rbd.clone() / rbd.create()) directly. Those calls build a Rados connection that sets mon_host, key and client_mount_timeout but never rbd_default_data_pool, so the resulting image is created without a data pool.
Net effect: every volume cloned from a template onto an EC-backed primary storage has all of its data objects written to the replicated metadata pool instead of the erasure-coded data pool. This silently defeats EC and consumes ~3x raw space for those volumes. Blank data disks on the same pool are correct, which makes the inconsistency easy to miss.
This was observed in production: of the VMs on an EC primary storage, the template-derived ROOT volumes had no data_pool (rbd info shows no data_pool: line and lacks the data-pool feature), while blank DATADISKs and the template base images themselves were correct.
Fix
In createDiskFromTemplateOnRBD, read the destination pool's rbd_default_data_pool detail once and, when present, confSet it on the Rados connection before connect() — in both the same-cluster clone/copy branch and the cross-cluster copy branch. librbd then uses it as the default data pool when the new image is created, so template-derived volumes get data_pool set, exactly like blank volumes already do. This mirrors how RBDStringBuilder injects the same key for the qemu-img path.
No behavior change for non-EC pools (dataPool == null → no-op).
Types of changes
How Has This Been Tested?