Commit 36db5e3
e2e: testing cgroup QoS with VolumeAttributeClass
Add end-to-end tests for the cgroup v2 QoS
feature that enforces I/O limits
on RBD volumes using Kubernetes
VolumeAttributesClass (VAC).
This testing validates the complete
lifecycle of QoS management including
metadata storage,
enforcement, and edge cases.
Test Coverage (13 scenarios):
Access Mode Coverage:
- RWO (ReadWriteOnce) filesystem with metadata validation
- RWO block with I/O enforcement testing using dd
- RWOP (ReadWriteOncePod) access mode validation
- RWX (ReadWriteMany) block with 3-replica deployment
- ROX (ReadOnlyMany) filesystem with clone and deployment
Critical Functionality:
- Multi-PVC pod with 3 volumes having different QoS tiers - validates
the updateIOMaxForDevice() read-modify-write logic that prevents
io.max file overwrites when multiple volumes share a pod's cgroup
- Snapshot/clone non-propagation - verifies .rbd.csi.ceph.com prefix
prevents QoS metadata inheritance during clone/snapshot operations
VAC Lifecycle Operations:
- VAC modification (low tier → high tier)
- Partial VAC update (all parameters → IOPS only)
- VAC removal (validate complete metadata cleanup)
- Add VAC to existing PVC without QoS
Integration Testing:
- Volume expansion with QoS persistence
- Encrypted volumes with QoS compatibility
Helper Functions (rbd_helper.go):
- validateCgroupQoS() - validates RBD image metadata with cgroup QoS prefix
- testIOEnforcement() - tests I/O limits using dd with 20% tolerance
- createMultiPVCPod() - creates pods with multiple RBD volumes
- createKRBDStorageClassWithModifySecret() - SC setup for VAC testing
YAML Templates:
- Multi-PVC pod templates (filesystem and block modes)
- Three-tier VolumeAttributesClass templates (low/medium/high QoS)
The tests require Kubernetes >= 1.34 for VolumeAttributesClass support
and cgroup v2 enabled on cluster nodes. All tests include cleanup
validation using validateRBDImageCount() and validateOmapCount().
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>1 parent 367603a commit 36db5e3
7 files changed
Lines changed: 1091 additions & 0 deletions
0 commit comments