-
Couldn't load subscription status.
- Fork 580
rbd: add validation to ToCSI() for rbdVolume and rbdSnapshot (backport #5151) #5167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
`doSnapshotClone()` returns a new `rbdVolume` object from a temporary snapshot. This conversion drops the `SourceVolumeID` attribute, as a `rbdVolume` does not have that. After converting the `rbdVolume` back to a `rbdSnapshot`, the `SourceVolumeID` attribute can be set again, and the `ToCSI()` function can create an appropriate CSI Snapshot struct. Signed-off-by: Niels de Vos <[email protected]> (cherry picked from commit b3faa04)
After an unfortnate timed restart of the provisioner, a volume that got cloned did not get a `rbdVolume.VolID` set. The `.VolID` is used as the CSI Volume Handle, and is a required attribute. The `rbdVolume` and `rbdSnapshot` structs have a `.ToCSI()` function that can do the validation of required attributes. This is now added, including unit-tests. Signed-off-by: Niels de Vos <[email protected]> (cherry picked from commit ac8cda5)
|
/test ci/centos/upgrade-tests-cephfs |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/k8s-e2e-external-storage/1.29 |
|
/test ci/centos/k8s-e2e-external-storage/1.31 |
|
/test ci/centos/mini-e2e-helm/k8s-1.29 |
|
/test ci/centos/mini-e2e-helm/k8s-1.31 |
|
/test ci/centos/mini-e2e/k8s-1.29 |
|
/test ci/centos/mini-e2e/k8s-1.31 |
|
/test ci/centos/k8s-e2e-external-storage/1.30 |
|
/test ci/centos/mini-e2e-helm/k8s-1.30 |
|
/test ci/centos/mini-e2e/k8s-1.30 |
After an unfortnate timed restart of the provisioner, a volume that got
cloned did not get a
rbdVolume.VolIDset. The.VolIDis used as theCSI Volume Handle, and is a required attribute.
The
rbdVolumeandrbdSnapshotstructs have a.ToCSI()functionthat can do the validation of required attributes. This is now added,
including unit-tests.
This is an automatic backport of pull request #5151 done by Mergify.