-
Notifications
You must be signed in to change notification settings - Fork 257
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
Fix DELL storagecapabilities #3249
Conversation
Hi @ido106. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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. |
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.
@ido106 , please keep the capabilities sorted as the existing ones:
{rwx, block},
{rwx, file},
{rwo, block},
{rwo, file},
{rox, block},
{rox, file},
Update also the PR & commit messages accordingly.
da384e6
to
3f9d898
Compare
3f9d898
to
8423424
Compare
@@ -289,11 +289,39 @@ func createDellUnityCapabilities() []StorageCapabilities { | |||
} | |||
} | |||
|
|||
func createDellPowerCapabilities() []StorageCapabilities { | |||
func createDellPowerMaxCapabilities() []StorageCapabilities { | |||
return []StorageCapabilities{ | |||
{rwx, block}, |
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.
@akalenyu according to the Dell doc PowerMax/PoweFlwex/PowerStore suppport RWX/ROX for Filesystem volume mode with NFS only. Shouldn't we add them to the capabilities?
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.
Yeah, there's a good chance this driver needs us to differentiate over one of storage class parameters,
for example, I see FibreChannel/iSCSI/NFS examples in here:
https://github.com/dell/csi-powermax/tree/main/samples/storageclass
Which could mean that somebody using powermax-nfs will fail to create block volumes altogether
containerized-data-importer/pkg/storagecapabilities/storagecapabilities.go
Lines 292 to 294 in 8423424
func createDellPowerMaxCapabilities() []StorageCapabilities { | |
return []StorageCapabilities{ | |
{rwx, block}, |
TBH usually it's best to have the storage provider make the recommendation
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.
Is it ok now?
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.
So the way they indicate this is nfs is via csi.storage.k8s.io/fstype
?
This is a little surprising since this key is normally used as a configurable to specify which filesystem you want created on top of the block device (ext4/xfs/...) For example - https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/docs/parameters.md
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.
After checking I think you are right. I can't find anything else that mentions nfs
or protocol
in the code in our context (except this but I don't think that's what we're looking for). Only DELL unity mentions the protocol explicitly as in the example here, but all the others do not.
Maybe we'll just ask a contact from DELL what the string is, if we have one?
8423424
to
e4aa822
Compare
e4aa822
to
3ded90c
Compare
return "csi-vxflexos.dellemc.com" | ||
} | ||
}, | ||
"csi-powermax.dellemc.com": func(sc *storagev1.StorageClass) string { |
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.
If it's ok now I'll try to add the last three to a function, because they have the same string key (csi.storage.k8s.io/fstype
)
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akalenyu 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 |
/test all |
At last we used the
|
}, | ||
"csi-powerstore.dellemc.com": func(sc *storagev1.StorageClass) string { | ||
// https://github.com/dell/csi-powerstore/blob/76e2cb671bd3cb28aa860e9057649d1d911e1deb/samples/storageclass | ||
switch strings.ToLower(sc.Parameters["csi.storage.k8s.io/fstype"]) { |
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'm passing it to a function because this line repeats itself
3ded90c
to
9e2e9d1
Compare
9e2e9d1
to
08fb4cf
Compare
According to Dell doc: https://dell.github.io/csm-docs/docs/csidriver/ Signed-off-by: Ido Aharon <iaharon@redhat.com>
08fb4cf
to
027ba46
Compare
@@ -280,12 +284,55 @@ var storageClassToProvisionerKeyMapper = map[string]func(sc *storagev1.StorageCl | |||
} | |||
}, | |||
"csi.vsphere.vmware.com": func(sc *storagev1.StorageClass) string { | |||
fsType := sc.Parameters["csi.storage.k8s.io/fstype"] | |||
fsType := getFSType(sc) |
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.
Just added getFSType
func for vSphere in the last push
/lgtm |
/hold cancel |
According to Dell doc: https://dell.github.io/csm-docs/docs/csidriver/ Signed-off-by: Ido Aharon <iaharon@redhat.com>
* Add storagecapabilities to vSphere provisioner (#3284) Signed-off-by: Ido Aharon <iaharon@redhat.com> * Fix Dell storagecapabilities (#3249) According to Dell doc: https://dell.github.io/csm-docs/docs/csidriver/ Signed-off-by: Ido Aharon <iaharon@redhat.com> * Add storagecapabilities to csi.huawei.com provisioner (#3253) Signed-off-by: Ido Aharon <iaharon@redhat.com> --------- Signed-off-by: Ido Aharon <iaharon@redhat.com> Co-authored-by: Ido Aharon <iaharon@redhat.com>
Signed-off-by: Ido Aharon iaharon@redhat.com
What this PR does / why we need it:
The current storagecapabilities for Dell PowerMax, PowerFlex, PowerScale and PowerStore are defined as:
{ {rwx, block}, {rwo, block}, {rwo,file} }
According to the DELL documentation, it should be:
PowerMax:
{ {rwx, block}, {rwo, block}, {rwo, file}, {rox, block} }
PowerFlex:
{ {rwx, block}, {rwo, block}, {rwo, file}, {rox, block}, {rox, file} }
PowerScale (block volume mode is not supported):
{ {rwx, file}, {rwo, file}, {rox, file} }
PowerStore:
{ {rwx, block}, {rwo, block}, {rwo, file}, {rox, block} }
If the
nfs
protocol is used, it is{ {rwx, block}, {rwo, block}, {rwo, file} }
for all types (except for PowerScale)Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #CNV-41538
Special notes for your reviewer:
Release note: