Skip to content

Add support for availability zones in volume creation.#493

Merged
donatwork merged 34 commits into
mainfrom
usr/dkhan/multiaz-createvolume
Apr 23, 2025
Merged

Add support for availability zones in volume creation.#493
donatwork merged 34 commits into
mainfrom
usr/dkhan/multiaz-createvolume

Conversation

@donatwork

@donatwork donatwork commented Mar 20, 2025

Copy link
Copy Markdown
Contributor

Description

Enhance volume creation to use parameters based on the topology requirements for array. The CreateVolume request will check for the zone specific array ID and other parameters which have defaults in the secret if not specified in the storage class.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1748

Checklist:

  • Have you run format,vet & lint checks against your submission?
  • Have you made sure that the code compiles?
  • Did you run the unit & integration tests successfully?
  • Have you maintained at least 90% code coverage?
  • Have you commented your code, particularly in hard-to-understand areas
  • Have you done corresponding changes to the documentation
  • Did you run tests in a real Kubernetes cluster?
  • Backward compatibility is not broken

How Has This Been Tested?

Test cases:

  1. Normal case of no labels on any nodes and secret has no zones. Validate that existing behavior is maintained.
  2. Secret and nodes have zoning labels and validate that volumes are only provisioned in the zone that the node and array are in.
  3. Upgrade from CSM 1.13 to CSM 1.14. The new style secret must not be in the driver namespace. Provision multiple pods/volumes on different nodes and on different arrays. Also include snapshot and clone test cases. Replication should also be tested.
  4. New style secrets with no labels nor parameters. All array information (SYMID, ...) is in the storage class. Provisioning of all volume types should work as expected.
  5. New style secrets with labels (no parameters) using one or more arrays. Storage class has complete storage array info. No nodes have matching labels. Attempt to provision volumes.
  6. New style secrets with labels (no parameters) using one or more arrays. One node has matching labels but the other does not have any matching labels. Storage class has array info. Attempt to provision volumes with a pod.
  7. New style secrets with labels (no parameters) using one array. Storage class has array info. Multiple nodes have matching labels. Attempt to provision multiple pods with multiple volumes. Validate that pods are distributed across nodes.
  8. New style secrets with labels (no parameters) using one array. Storage class does not have array info. Multiple nodes have matching labels. Attempt to provision multiple pods with multiple volumes. Validate that pods are distributed across nodes.
  9. New style secrets with labels (no parameters) multiple arrays in different zones. Storage classes do not have array info. Nodes have zoning for their respective array. Attempt to provision multiple pods with multiple volumes. Validate that pods are distributed across nodes according to what zone they are in.

Comment thread samples/storageclass/powermax_zone.yaml
@donatwork donatwork marked this pull request as ready for review April 21, 2025 12:22
@donatwork donatwork requested a review from abhi16394 as a code owner April 21, 2025 12:22
lukeatdell
lukeatdell previously approved these changes Apr 21, 2025
Comment thread service/controller.go Outdated
Comment thread service/controller.go
Comment thread service/controller.go
Comment thread service/controller.go
@donatwork donatwork requested a review from JacobGros April 21, 2025 21:24
alexemc
alexemc previously approved these changes Apr 22, 2025
Comment thread samples/secret/secret.yaml
Comment thread service/controller.go
Comment thread test/multi-az/scripts/modify_zoning_labels.sh Outdated
alexemc
alexemc previously approved these changes Apr 23, 2025
@github-actions

Copy link
Copy Markdown
Contributor

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/csi-powermax/csireverseproxy/pkg/proxy 0.00% (ø)
github.com/dell/csi-powermax/service 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/csi-powermax/service/controller.go 0.00% (ø) 0 0 0
github.com/dell/csi-powermax/service/node.go 0.00% (ø) 0 0 0
github.com/dell/csi-powermax/service/service.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/dell/csi-powermax/csireverseproxy/pkg/proxy/proxy_test.go
  • github.com/dell/csi-powermax/service/controller_test.go
  • github.com/dell/csi-powermax/service/node_test.go

@donatwork donatwork merged commit 2314c95 into main Apr 23, 2025
@donatwork donatwork deleted the usr/dkhan/multiaz-createvolume branch April 23, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants