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

Fix Portworx CSI storage capabilities #2789

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

arnongilboa
Copy link
Collaborator

@arnongilboa arnongilboa commented Jul 5, 2023

What this PR does / why we need it:
Add preferred ReadWriteMany, Filesystem capability to the pxd.portworx.com provisioner.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Special notes for your reviewer:

Release note:

Add preferred ReadWriteMany, Filesystem capability to the pxd.portworx.com provisioner

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/XS labels Jul 5, 2023
@arnongilboa arnongilboa changed the title [WIP] Add rwx,file capability to pxd.portworx.com provisioner Add rwx,file capability to pxd.portworx.com provisioner Jul 11, 2023
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 11, 2023
@@ -89,7 +89,7 @@ var CapabilitiesByProvisionerKey = map[string][]StorageCapabilities{
"pxd.openstorage.org/shared": createOpenStorageSharedVolumeCapabilities(),
"pxd.openstorage.org": createRWOBlockAndFilesystemCapabilities(),
"pxd.portworx.com/shared": createOpenStorageSharedVolumeCapabilities(),
"pxd.portworx.com": createRWOBlockAndFilesystemCapabilities(),
"pxd.portworx.com": {{rwx, file}, {rwo, block}, {rwo, file}},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

no need for shared: true in the storage class parameters for it to be ReadWriteMany, as far as I saw.
I used a PVC of Filesystem ReadWriteMany with px-csi-db SC.

@@ -89,7 +89,7 @@ var CapabilitiesByProvisionerKey = map[string][]StorageCapabilities{
"pxd.openstorage.org/shared": createOpenStorageSharedVolumeCapabilities(),
"pxd.openstorage.org": createRWOBlockAndFilesystemCapabilities(),
"pxd.portworx.com/shared": createOpenStorageSharedVolumeCapabilities(),
Copy link
Member

Choose a reason for hiding this comment

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

Noticed that we are saying RWX/Block is supported but https://github.com/libopenstorage/openstorage/blob/master/csi/controller.go#L408-L412 begs to differ?

Copy link
Member

Choose a reason for hiding this comment

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

Seems we may need to revamp and correct the portworx caps and backport to previous releases too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, so the code impliciltly says RWX/File,RWO/Block,RWO/File are supported in the shared provisioners?

@awels
Copy link
Member

awels commented Aug 25, 2023

/test pull-containerized-data-importer-e2e-upg

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
@arnongilboa arnongilboa changed the title Add rwx,file capability to pxd.portworx.com provisioner Fix Portworx CSI storage capabilities Sep 3, 2023
"pxd.portworx.com/shared": createOpenStorageSharedVolumeCapabilities(),
"pxd.portworx.com": createRWOBlockAndFilesystemCapabilities(),
"pxd.portworx.com": createOpenStorageSharedVolumeCapabilities(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Created DVs on pxd.portworx.com - all these Succeeded: {RWX, FS}, {RWO, Block}, {RWO, FS}

@kubevirt-bot
Copy link
Contributor

@jpeimer: changing LGTM is restricted to collaborators

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.

@akalenyu
Copy link
Collaborator

akalenyu commented Sep 4, 2023

/cc @pureneelesh @luayalem

Hey! We are trying to provide some defaults for Portworx storage classes
Does this look right?

func createOpenStorageSharedVolumeCapabilities() []StorageCapabilities {
return []StorageCapabilities{
{rwx, file},
{rwo, block},
{rwo, file},
}
}

Also IIUC "shared" is deprecated, and our code still filters based on that

"pxd.portworx.com": func(sc *storagev1.StorageClass) string {
//https://docs.portworx.com/portworx-install-with-kubernetes/storage-operations/csi/volumelifecycle/#create-shared-csi-enabled-volumes
val := sc.Parameters["shared"]
if val == "true" {
return "pxd.portworx.com/shared"
}
return "pxd.portworx.com"

@kubevirt-bot
Copy link
Contributor

@akalenyu: GitHub didn't allow me to request PR reviews from the following users: luayalem, pureneelesh.

Note that only kubevirt members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @pureneelesh @luayalem

Hey! We are trying to provide some defaults for Portworx storage classes
Does this look right?

func createOpenStorageSharedVolumeCapabilities() []StorageCapabilities {
return []StorageCapabilities{
{rwx, file},
{rwo, block},
{rwo, file},
}
}

Also IIUC "shared" is deprecated, and our code still filters based on that

"pxd.portworx.com": func(sc *storagev1.StorageClass) string {
//https://docs.portworx.com/portworx-install-with-kubernetes/storage-operations/csi/volumelifecycle/#create-shared-csi-enabled-volumes
val := sc.Parameters["shared"]
if val == "true" {
return "pxd.portworx.com/shared"
}
return "pxd.portworx.com"

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.

@akalenyu
Copy link
Collaborator

akalenyu commented Sep 4, 2023

Following offline discussion, we will pursue pinpointed portworx variation filtering outside of this PR.
For now, this is fixing an error (rwx, block) and will benefit users.

/approve

@kubevirt-bot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2023
@akalenyu
Copy link
Collaborator

akalenyu commented Sep 5, 2023

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 5, 2023
@akalenyu
Copy link
Collaborator

akalenyu commented Sep 5, 2023

/test pull-containerized-data-importer-e2e-upg

@kubevirt-bot kubevirt-bot merged commit 2577211 into kubevirt:main Sep 5, 2023
18 checks passed
@akalenyu
Copy link
Collaborator

akalenyu commented Sep 5, 2023

/cherrypick release-v1.57

@kubevirt-bot
Copy link
Contributor

@akalenyu: new pull request created: #2890

In response to this:

/cherrypick release-v1.57

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.

@arnongilboa
Copy link
Collaborator Author

/cherrypick release-v1.56

@kubevirt-bot
Copy link
Contributor

@arnongilboa: #2789 failed to apply on top of branch "release-v1.56":

Applying: Fix Portworx CSI storage capabilities
Using index info to reconstruct a base tree...
M	pkg/storagecapabilities/storagecapabilities.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/storagecapabilities/storagecapabilities.go
CONFLICT (content): Merge conflict in pkg/storagecapabilities/storagecapabilities.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix Portworx CSI storage capabilities
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-v1.56

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.

arnongilboa added a commit to arnongilboa/containerized-data-importer that referenced this pull request Sep 14, 2023
Manual backport of kubevirt#2789

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
arnongilboa added a commit to arnongilboa/containerized-data-importer that referenced this pull request Sep 14, 2023
Manual backport of kubevirt#2789, plus minor alignments with main branch.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
kubevirt-bot pushed a commit that referenced this pull request Sep 14, 2023
Manual backport of #2789, plus minor alignments with main branch.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
arnongilboa added a commit to arnongilboa/containerized-data-importer that referenced this pull request Sep 19, 2023
Manual backport of kubevirt#2789, plus minor alignments with main branch.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
kubevirt-bot pushed a commit that referenced this pull request Sep 20, 2023
Manual backport of #2789, plus minor alignments with main branch.

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants