Skip to content
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

Added integration test for tree quota #223

Merged
merged 6 commits into from
Aug 8, 2023
Merged

Conversation

KshitijaKakde
Copy link
Contributor

@KshitijaKakde KshitijaKakde commented Jul 25, 2023

Description

This PR adds integration test for NFS Tree quota

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#763

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

image
image

image

And a basic nfs volume request with quota enabled volname "nfsvolume1" volsize "8" path "/fs" softlimit "200" graceperiod "86400" # :1 -> *feature
time="2023-08-08T09:12:37-04:00" level=info msg="getSystemIDFromParameters system 05d539c3cdc5280f"
time="2023-08-08T09:12:37-04:00" level=info msg="Use systemID as 05d539c3cdc5280f"
time="2023-08-08T09:12:37-04:00" level=info msg="Received CreateVolume request without accessibility keys"
time="2023-08-08T09:12:37-04:00" level=info msg="Protection Domain name not provided; there could be conflicts if two storage pools share a name"
time="2023-08-08T09:12:37-04:00" level=info msg="Executing CreateVolume with following fields" Name=nfsvolume1_091237 NasServerID=64132f37-d33e-9d4a-89ba-d625520a4779 SizeInB=8589934592 StoragePoolID=28515fee00000000 x-csi-pv-claimname= x-csi-pv-name= x-csi-pv-namespace=
time="2023-08-08T09:12:37-04:00" level=debug msg="Volume does not exist, proceeding to create new volume"
time="2023-08-08T09:13:26-04:00" level=debug msg="Error creating quota for volume: nfsvolume1_091237 of size: 8589934592 bytes, error: rpc error: code = InvalidArgument desc = requested softLimit: 200 perc is greater than volume size: 8589934592 for volume 64d23f45-fd0a-531b-98ba-3a7645b0a943:"
time="2023-08-08T09:13:26-04:00" level=debug msg="Successfully rolled back by deleting the newly created volume: nfsvolume1_091237"
CreateVolume rpc error: code = InvalidArgument desc = requested softLimit: 200 perc is greater than volume size: 8589934592 for volume 64d23f45-fd0a-531b-98ba-3a7645b0a943::
When I call CreateVolume # :1 -> *feature
Then the error message should contain "requested softLimit: 200 perc is greater than volume size" # :1 -> *feature

2 scenarios (2 passed)
8 steps (8 passed)
1m37.235822584s
=== RUN TestIdentityGetPluginInfo
testing GetPluginInfo
testing GetPluginInfo passed: csi-vxflexos.dellemc.com
--- PASS: TestIdentityGetPluginInfo (0.00s)

| errormsg |
| "error creating quota, path cannot be empty" |

Scenario: Create basic nfs volume with tree quota enabled with empty path value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path --> grace period

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Examples:
| errormsg |
| "error creating quota, graceperiod cannot be empty" |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add more test wrt to quota creation, where relevant error scenarios are handled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Examples:
| errormsg |
| "error creating quota, graceperiod cannot be empty" |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add test scenarios for expand volume with quota enabled/disabled along with error scenarios.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -15,6 +15,8 @@
export X_CSI_VXFLEXOS_THICKPROVISION=false
export X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE="true"
export X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOTS="true"
#Uncomment X_CSI_QUOTA_ENABLED if you want to enable quota for nfs volume
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the commented code, if not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is needed

Copy link
Contributor

@khareRajshree khareRajshree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide the screenshots for the integration tests results.

Then the error message should contain <errormsg>
Examples:
| errormsg |
| "error creating quota" |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the error msg wrt to empty path or invalid graceperiod? If so then update the scenario and err msg accordingly.

Then the error message should contain <errormsg>
Examples:
| errormsg |
| "error creating quota" |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the error msg wrt to empty path or empty softlimit? If so then update the scenario and error msg accordingly.

And there are no errors
And when I call NodePublishVolume for nfs "SDC_GUID"
And there are no errors
And when I call NfsExpandVolume to "15000"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the upper bound for maximum size for expand volume?

Copy link
Contributor

@khareRajshree khareRajshree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure overall integration tests are also passing with the new ones added.
LGTM.

@KshitijaKakde KshitijaKakde merged commit 9139b06 into main Aug 8, 2023
@anandrajak1 anandrajak1 deleted the tree-quota-final branch October 17, 2024 18: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.

4 participants