-
Notifications
You must be signed in to change notification settings - Fork 27
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
NFS tree quota support #222
Conversation
service/controller.go
Outdated
} | ||
|
||
// create quota for the filesystem | ||
if isQuotaEnabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why to check the isQuotaEnabled again here. I think we are checking this above at line no: 379
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
service/controller.go
Outdated
// enabling quota on FS | ||
fs, err := system.GetFileSystemByIDName(fsID, "") | ||
if err != nil { | ||
Log.Debugf("Find Volume response: %v Error: %v", fs, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we return error when the filesystem is not found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
service/features/service.feature
Outdated
@@ -1265,12 +1265,24 @@ Feature: VxFlex OS CSI interface | |||
When I call Node Probe | |||
Then the error contains "The given GUID is invalid" | |||
|
|||
Scenario: Controller expand volume for NFS | |||
Given a VxFlexOS service | |||
# @wip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you removed these commented tests if they are not required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
service/step_handlers_test.go
Outdated
@@ -791,7 +802,7 @@ func handleFileSystems(w http.ResponseWriter, r *http.Request) { | |||
replacementMap["__ID__"] = id | |||
replacementMap["__NAME__"] = name | |||
replacementMap["__SIZE_IN_Total__"] = fileSystemIDToSizeTotal[id] | |||
replacementMap["__PARENT_ID__"] = fileSystemIDParentID[id] | |||
//replacementMap["__IS_QUOTA_ENABLED__"] = fileSystemIDToQuotaEnabled[id] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you replacing the parent id to quota?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
fs, err := system.GetFileSystemByIDName(fsResp.ID, "") | ||
if err != nil { | ||
Log.Debugf("Find Volume response error: %v", err) | ||
return nil, status.Errorf(codes.Unknown, "Find Volume response error: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here codes.notfound or codes.internal will be a great fit rather than codes.unknow thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @VamsiSiddu-7, I referred to the existing codes used for such error scenarios, hence went ahead to maintain the same responses.
https://github.com/dell/csi-powerflex/blob/main/service/controller.go#L361
If we plan to change it here, then it should be reflected to other instances as well to maintain the consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay let's keep it the same codes.Unknown we will have consistency
newFs, err := system.GetFileSystemByIDName(fsResp.ID, "") | ||
if err != nil { | ||
Log.Debugf("Find Volume response: %v Error: %v", newFs, err) | ||
Log.Debugf("Find Volume response error: %v", err) | ||
return nil, status.Errorf(codes.Unknown, "Find Volume response error: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping it same to maintain consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still need some changes please address those thanks
Description
Add support for tree quota for NFS volume creation and expansion.
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
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
helm test:
executed 1vol-nfs
then expand volume by re-applying the yaml.
k apply -f /csi-powerflex/test/helm/1vol-nfs/templates/pvc0.yaml
cert-csi:
./cert-csi test expansion -v 1 -p 1 -iSize 8Gi -expSize 12Gi --sc vxflexos-nfs
controller logs: