Skip to content

Update CreateVolume to conform to CSI 1.6 Spec #407

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

Merged
merged 4 commits into from
Jun 24, 2025

Conversation

suryagupta4
Copy link
Contributor

@suryagupta4 suryagupta4 commented Jun 20, 2025

Description

This PR addresses the following CSI Spec test scenarios for CreateVolume:

  • Should fail when source volume is not found.
  • Should fail when source snapshot is not found.
  • Should create volume from existing source snapshot.
  • Should create volume from existing source volume.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1896

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Ran csi-sanity for CreateVolume
# ./csi-sanity --csi.endpoint=unix:///root/csi.sock --ginkgo.focus='CreateVolume' --ginkgo.flake-attempts=3
Running Suite: CSI Driver Test Suite - /root/csi-sanity
=======================================================
Random Seed: 1750760545

Will run 11 of 78 specs
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
------------------------------
P [PENDING]
Controller Service [Controller Server] ListVolumes pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted
/root/csi-sanity/csi-test-5.0.0/pkg/sanity/controller.go:268
------------------------------
•••
------------------------------
• [SLOW TEST] [6.117 seconds]
Controller Service [Controller Server] CreateVolume should return appropriate values SingleNodeWriter WithCapacity 1Gi
/root/csi-sanity/csi-test-5.0.0/pkg/sanity/controller.go:430
------------------------------
• [SLOW TEST] [5.122 seconds]
Controller Service [Controller Server] CreateVolume should not fail when requesting to create a volume with already existing name and same capacity
/root/csi-sanity/csi-test-5.0.0/pkg/sanity/controller.go:460
------------------------------
• [SLOW TEST] [5.768 seconds]
Controller Service [Controller Server] CreateVolume should fail when requesting to create a volume with already existing name and different capacity
/root/csi-sanity/csi-test-5.0.0/pkg/sanity/controller.go:501
------------------------------
• [SLOW TEST] [6.284 seconds]
Controller Service [Controller Server] CreateVolume should not fail when creating volume with maximum-length name
/root/csi-sanity/csi-test-5.0.0/pkg/sanity/controller.go:545
------------------------------
I0624 05:23:03.888210 2941565 resources.go:320] deleting snapshot ID 584=_=_=echo=_=_=System
• [SLOW TEST] [14.856 seconds]
Controller Service [Controller Server] CreateVolume should create volume from an existing source snapshot
/root/csi-sanity/csi-test-5.0.0/pkg/sanity/controller.go:572
------------------------------
•
------------------------------
↺ [FLAKEY TEST - TOOK 2 ATTEMPTS TO PASS] [SLOW TEST] [9.512 seconds]
Controller Service [Controller Server] CreateVolume should create volume from an existing source volume
/root/csi-sanity/csi-test-5.0.0/pkg/sanity/controller.go:617
------------------------------
•SSSSSSSSSSSSSSSSSSSSSSSSSSSS

Ran 11 of 78 Specs in 51.644 seconds
SUCCESS! -- 11 Passed | 0 Failed | 1 Flaked | 1 Pending | 66 Skipped

Have added retry in csi-test for one of the test cases should create volume from an existing source volume since csi-test is using same volume name in another test case. The export is getting deleted by that another test hence executed the test again using the flake flag to ensure export is present when this particular test is being executed.

  • Ran cert-csi successfully
# cert-csi certify --cert-config config.yaml --vsc isilon-snapclass --no-metrics
[2025-06-24 05:15:18]  INFO Starting cert-csi; ver. 1.6.0
[2025-06-24 05:15:18]  INFO Created test_runs table
[2025-06-24 05:15:18]  INFO Created test_cases table
[2025-06-24 05:15:18]  INFO Created events table
[2025-06-24 05:15:18]  INFO Created entities table
[2025-06-24 05:15:18]  INFO Created number_entities table
[2025-06-24 05:15:18]  INFO Created resource_usage table
[2025-06-24 05:15:18]  INFO Created entities_relations table
[2025-06-24 05:15:18]  INFO Created tables
[2025-06-24 05:15:18]  INFO Suites to run with isilon storage class:
[2025-06-24 05:15:18]  INFO 1. VolumeIoSuite {volumes: 2, volumeSize: 8Gi chains: 2-2}
[2025-06-24 05:15:18]  INFO 2. ScalingSuite {replicas: 2, volumes: 5, volumeSize: 8Gi}
[2025-06-24 05:15:18]  INFO 3. CloneVolumeSuite {pods: 2, volumes: 1, volumeSize: 8Gi}
[2025-06-24 05:15:18]  INFO 4. VolumeExpansionSuite {pods: 1, volumes: 1, size: 8Gi, expSize: 16Gi, block: false}
[2025-06-24 05:15:18]  INFO 5. SnapSuite {snapshots: 3, volumeSize; 8Gi}
[2025-06-24 05:15:18]  INFO 6. ReplicationSuite {pods: 2, volumes: 5, volumeSize: 8Gi}
[2025-06-24 05:15:18]  INFO 7. MultiAttachSuite {pods: 5, rawBlock: false, size: 8Gi, accMode: ReadWriteMany}
Does it look OK? (Y)es/(n)o
.
.
.
[2025-06-24 05:21:25]  INFO Started generating reports...
Collecting metrics
7 / 7 [-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% ? p/s[2025-06-24 05:21:25]  INFO Avg time of a run:   182.41s
[2025-06-24 05:21:25]  INFO Avg time of a del:   21.44s
[2025-06-24 05:21:25]  INFO Avg time of all:     203.96s
[2025-06-24 05:21:25]  INFO During this run 100.0% of suites succeeded

Copy link

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/csi-powerscale/service 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/csi-powerscale/service/controller.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-powerscale/service/controller_test.go

@suryagupta4 suryagupta4 merged commit 20189e6 into main Jun 24, 2025
6 checks passed
@suryagupta4 suryagupta4 deleted the usr/suryagupta4/createvolume-csi-spec-fix branch June 24, 2025 10:44
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.

5 participants