You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[cinder-csi-plugin] Rationalise all things topology (#2865)
* cinder-csi-plugin: Don't set segment with empty topology value
This is actually handled by csi-provisioner, but it's arguably
incorrect.
Signed-off-by: Stephen Finucane <[email protected]>
* tests: Don't use global mocks
Calling '.On' with the same expected arguments multiple times will only
result in a single mock: the first one. We should avoid doing this.
We also remove some useless comments that simply duplicate what the
calls already say.
Signed-off-by: Stephen Finucane <[email protected]>
* cinder-csi-plugin: Add tests for ignore-volume-az
Signed-off-by: Stephen Finucane <[email protected]>
* cinder-csi-plugin: Add tests for --with-topology=false
This highlights an issue (IMO) is how we handle parameter generation.
Signed-off-by: Stephen Finucane <[email protected]>
* cinder-csi-plugin: Group topology generation
Group everything together rather than having it spread out as it is
currently. A decoder of the logic, to ensure nothing has changed:
1. Determine what the OpenStack Cinder volume's AZ will be:
a. If the `availability` parameter is set on the Storage Class, the
cinder volume will use this as the AZ.
b. Otherwise, the cinder volume will use: an AZ extracted from one of
the preferred CSI Topologies; an AZ extracted from one of the
requisite (available) Topologies; or no AZ.
2. Determine what the Kubernetes CSI Volume's topology will be:
a. If the `ignore-volume-az` option is set, the CSI Volume will use
the preferred CSI Volume Topologies, if any, else None. [*]
b. Otherwise, the CSI Volume will generate a Volume Topology from the
Cinder Volume's AZ.
[*] This practically means that `ignore-volume-az` is only useful when
the availability parameter is set on the Storage Class. This in turn
means the CSI Volume Topology is junk as it has no bearing on the
"real" topology constraint on the volume.
Signed-off-by: Stephen Finucane <[email protected]>
---------
Signed-off-by: Stephen Finucane <[email protected]>
0 commit comments