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

[Test] check if cephcsi is having any issue to support multiple accessModes. #4853

Open
Madhu-1 opened this issue Sep 20, 2024 · 7 comments
Open
Labels
component/testing Additional test cases or CI work keepalive This label can be used to disable stale bot activiity in the repo

Comments

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Sep 20, 2024

Kubernetes and the CSI spec support creating a volume with multiple accessModes, check if cephcsi is already supporting it or not and see if there are any issues with the supports, if it's supported and don't have any issues we need to add E2E testing for the same.

@Madhu-1 Madhu-1 added the component/testing Additional test cases or CI work label Sep 20, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the wontfix This will not be worked on label Oct 20, 2024
@Madhu-1 Madhu-1 removed the wontfix This will not be worked on label Oct 21, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the wontfix This will not be worked on label Nov 20, 2024
@Madhu-1 Madhu-1 added keepalive This label can be used to disable stale bot activiity in the repo and removed wontfix This will not be worked on labels Nov 21, 2024
@iPraveenParihar
Copy link
Contributor

Tried with below possible combinations -

  • RWO, RWX - ✅
  • (ROX, RWX) & (ROX, RWO) & (ROX, RWX, RWO) - ❌ failed to provision volume with StorageClass "rook-ceph-block": rpc error: code = InvalidArgument desc = readOnly accessMode is supported only with content source

we have this check for RWO here -

func CheckReadOnlyManyIsSupported(req *csi.CreateVolumeRequest) error {
for _, capability := range req.GetVolumeCapabilities() {
if m := capability.GetAccessMode().GetMode(); m == csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY ||
m == csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY {
if req.GetVolumeContentSource() == nil {
return status.Error(codes.InvalidArgument, "readOnly accessMode is supported only with content source")
}
}
}
return nil
}

probably, we need to remove this check or tweak the condition to allow above combination?

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Dec 11, 2024

ROX is only supported for clone from PVC or clone from snapshot not for a fresh PVC because its empty PVC and of no use for read only mode.

@iPraveenParihar
Copy link
Contributor

ROX is only supported for clone from PVC or clone from snapshot not for a fresh PVC because its empty PVC and of no use for read only mode.

I agree, but now that we aim to support multiple access modes, this condition is no longer relevant. What about a PVC with both ROX and RWO access modes, where one pod writes data while others access it as read-only? 🤔

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Dec 16, 2024

ROX is only supported for clone from PVC or clone from snapshot not for a fresh PVC because its empty PVC and of no use for read only mode.

I agree, but now that we aim to support multiple access modes, this condition is no longer relevant. What about a PVC with both ROX and RWO access modes, where one pod writes data while others access it as read-only? 🤔

The kubernetes access needs to be translated into CSI specification, AFAIK we don't have such a cap in csi spec, if we have one we need to support it as well.

ROX translates to VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY where its multi node reader only not one writer and many readers. lets dig more and see if we are missing anything and we can add such cases as we need to comply with CSI spec.

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Dec 16, 2024

https://github.com/kubernetes-csi/csi-lib-utils/blob/master/accessmodes/access_modes.go might help you to translate kube access to CSI spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/testing Additional test cases or CI work keepalive This label can be used to disable stale bot activiity in the repo
Projects
None yet
Development

No branches or pull requests

2 participants