-
Notifications
You must be signed in to change notification settings - Fork 348
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
Make fstype configurable in external provisioner #400
Conversation
Hi @humblec. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/release-note-none |
/ok-to-test |
@humblec: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
2203dd2
to
6ccc9e5
Compare
6ccc9e5
to
3c96181
Compare
3c96181
to
c67f85c
Compare
/lgtm |
@@ -518,8 +519,8 @@ func (p *csiProvisioner) ProvisionExt(options controller.ProvisionOptions) (*v1. | |||
if fsTypesFound > 1 { | |||
return nil, controller.ProvisioningFinished, fmt.Errorf("fstype specified in parameters with both \"fstype\" and \"%s\" keys", prefixedFsTypeKey) | |||
} | |||
if len(fsType) == 0 { | |||
fsType = defaultFSType | |||
if fsType == "" && p.defaultFSType != "" { |
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 add unit tests that test the various combinations?
- StorageClass set + default set
- StorageClass unset + default set
- StorageClass set + default unset
- StorageClass unset + default unset
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.
Added the test cases ! ..
/retest |
The newly added test
Even when I run individual test on
But when I run the controller package level test it fails: The failure says
|
@msau42 @jsafrane @xing-yang any thoughts on why few of the existing tests ( For ex: TestProvision) are failing randomly when package-level test is triggered ? |
There are 4 combinations added here: StorageClass set + default set StorageClass unset + default set StorageClass set + default unset StorageClass unset + default unset Signed-off-by: Humble Chirammal <[email protected]>
@msau42 I believe this is good to go in! |
} | ||
|
||
if tc.expectedPVSpec != nil { | ||
if pv.Name != tc.expectedPVSpec.Name { |
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 the test logic would be cleaner if we did a deepequal of the entire pv spec, instead of matching individual fields one by one. But we can consider cleaning that up separately.
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.
Sure, I will do that in a follow-up PR. There are some more places it need to be done in this file anyway.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: humblec, msau42 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
At present the fstype is set to
ext4
if nothing is passed in storage-class.However a SP could prefer to have different fstype for many reasons for their
driver/volumes. This patch enables SP who is using the external-provisioner
to choose the fstype which they want to have it.
Fix# #328
Signed-off-by: Humble Chirammal [email protected]
What this PR does / why we need it:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: