Skip to content

Fixing clonevolume error scenario#97

Merged
sakshi-garg1 merged 8 commits into
mainfrom
fix_1773_clonevolume
Mar 17, 2025
Merged

Fixing clonevolume error scenario#97
sakshi-garg1 merged 8 commits into
mainfrom
fix_1773_clonevolume

Conversation

@sakshi-garg1

@sakshi-garg1 sakshi-garg1 commented Mar 12, 2025

Copy link
Copy Markdown
Contributor

PR Submission checklist

GitHub Issues

List the GitHub issues impacted by this PR:

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

Common PR Checklist:

  • Have you made sure that the code compiles?
  • Have you commented your code, particularly in hard-to-understand areas
  • Did you run tests in a real Kubernetes cluster?
  • Have you maintained backward compatibility

Description of your changes:

Clone volume function was not checking for copy errors in the response given by the api. These changes also check for any errors in response and return error.

Tested by building image and cloning the volume manually where driver is running with guest credentials in secret file:
Expected behavior now is that driver must not allow volume to clone and hence volume remains in pending state. Also must log appropriate error message
image
image

Cert-csi runs successfully :
cert-csi- when user is guest.txt

When running driver with a root credentials
Expected behavior now is that driver must allow volume to clone

image
image
image
Cert-csi runs successfully :
cert-csi- when user is root.txt

@sakshi-garg1 sakshi-garg1 self-assigned this Mar 12, 2025
@sakshi-garg1 sakshi-garg1 changed the title [WIP]: fixing clonevolume error scenario Fixing clonevolume error scenario Mar 17, 2025
@sakshi-garg1 sakshi-garg1 marked this pull request as ready for review March 17, 2025 05:27
rishabhatdell
rishabhatdell previously approved these changes Mar 17, 2025
Comment thread volume.go Outdated
Comment thread volume_test.go
@github-actions

Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/gopowerscale 0.00% (ø)
github.com/dell/gopowerscale/api/v1 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/gopowerscale/api/v1/api_v1_types.go 0.00% (ø) 0 0 0
github.com/dell/gopowerscale/api/v1/api_v1_volumes.go 0.00% (ø) 0 0 0
github.com/dell/gopowerscale/volume.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/gopowerscale/volume_test.go

@sakshi-garg1 sakshi-garg1 merged commit b8bae60 into main Mar 17, 2025
@sakshi-garg1 sakshi-garg1 deleted the fix_1773_clonevolume branch March 17, 2025 11:22
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.

4 participants