Support for cloned pvcs was added in ODF 4.17 via flattening. The main use case is virtual machines created from golden image, but this can be used and tested with any workload.
Ramen does not do a lot in this use case, but we want to be sure that the code filtering volume replication classes and handling errors cases when handling VR status is kept working.
Creating a workload with cloned pvc is pretty quick, and flattening a tiny image is very fast, so there is no issue to run this workload with any PR.
Creating the workload
Create and provision source pvc with busybox image
We can use DataVolume to provision the pvc from a container disk image
Create a volume snapshot from the pvc
Delete the source pvc
Create a workload using the PVC with the volume snapshot as source
We can use DataVolume to create a pvc from the volume snapshot in another namespace.
When adding drpc, use a drpolicy with flattening enabled
Cleaning up
Remove the volume snapshot
We can treat the volume snapshot as shared resources that can be used by other tests, create it in the suite setup phase, and remove it in suite teardown phase.
Deployers
Should we test with one deployer or many?
Environment
Add CDI to regional-dr env to make it easy to create and provision pvcs
Add vrc with flattenMode enabled
Add drpolicy selecting the vrc with flattening enabled
Related info
I have scripts and resources for manual testing with deployment and vm here:
Support for cloned pvcs was added in ODF 4.17 via flattening. The main use case is virtual machines created from golden image, but this can be used and tested with any workload.
Ramen does not do a lot in this use case, but we want to be sure that the code filtering volume replication classes and handling errors cases when handling VR status is kept working.
Creating a workload with cloned pvc is pretty quick, and flattening a tiny image is very fast, so there is no issue to run this workload with any PR.
Creating the workload
Cleaning up
Deployers
Environment
Related info
I have scripts and resources for manual testing with deployment and vm here: