ceph / ceph-csi

CSI driver for Ceph
Apache License 2.0
1.19k stars 528 forks source link

run kubernetes csi-test suite on ceph-csi #250

Open Madhu-1 opened 5 years ago

Madhu-1 commented 5 years ago

we need to integrate ceph-csi with csi-test to test the CSI API capability of a driver.

Madhu-1 commented 5 years ago

@nixpanic

Madhu-1 commented 5 years ago

CC @ShyamsundarR

ShyamsundarR commented 5 years ago

csi-test plugin sanity runs by acting like the kubernetes driver services (provisioner/attacher/snapshotter etc.). IOW it sends in the required RPCs that invoke CSI plugin functionality across supported calls.

Hence, it does not need a kubernetes setup to run, or the kubernetes sidecars to function, it needs a running plugin instance to send the RPCs to. Also, it does not, as a result, pollute the CO system it is running on (in case it is used in such a manner).

Hence to run this against ceph-csi, without mocking any interface in ceph-csi plugins, we need the following prerequisites satisfied, Prerequisites:

To run it in the above environment,

NOTE: Current pass rate is about 50% with some low hangers that we can fix to improve the same.


Thoughts on integration:

Other frameworks that test CSI plugin functionality from a kubernetes standpoint also help, but to test out ceph-csi specific internals, IMO we need to start here and dig down into the code for other edge conditions, than use broader integration test frameworks to achieve the same.

ShyamsundarR commented 5 years ago

Here are the pod and RBAC manifests used against v1.0.0 rbdplugin for a test.

rbdplugin-pod.yaml rbdplugin-rbac.yaml Output from the test

ShyamsundarR commented 5 years ago

As a part of broader CI possibility, played with running minikube on TravisCI and here is an initial run, that setups up rook on a minikube instance in TravisCI. The files and code are here, and we can possibly start from here and see how to run csi-test suite next on the same.

leseb commented 5 years ago

CircleCI config to run minikube https://github.com/ceph/cn/blob/master/.circleci/config.yml

mykaul commented 4 years ago

@ShyamsundarR - any updates?

ShyamsundarR commented 4 years ago

@ShyamsundarR - any updates?

I am not on this task. I provided information based on runs and setup that I did to test the same out, to aid adoption into the e2e framework.

I agree this is a priority, as it helps keep the CSI plugins code quality higher and should be tracked as such.

Madhu-1 commented 4 years ago

@humblec @ShyamsundarR @poornimag @nixpanic anyone like to take this up for next release?

nixpanic commented 4 years ago

Not sure for what release this will be ready, but I'm working on this a little now.

Environment for local testing:

This should allow for easy integration in the CentOS CI or other CI environments.

Madhu-1 commented 4 years ago

@nixpanic how about running this as a kubernetes Job in E2E testing?

we should be able to download the csi-sanity binary and connect to the socket where csi driver is running

nixpanic commented 4 years ago

More details are in https://kubernetes.io/blog/2020/01/08/testing-of-csi-drivers/

humblec commented 4 years ago

@nixpanic @Madhu-1 do we need this any more ?

Madhu-1 commented 4 years ago

Yes we need to run csi-test with cephcsi

humblec commented 4 years ago

Yes we need to run csi-test with cephcsi

as long as we cover the features with e2e i miss the point why we need that :)

Madhu-1 commented 4 years ago

Yes we need to run csi-test with cephcsi

as long as we cover the features with e2e i miss the point why we need that :)

to make sure we return proper error code and to make sure we are not missing any other valid or invalid cases

Madhu-1 commented 3 years ago

@nixpanic do we need it in release-3.0.0 milestone? or can we move it outside

Madhu-1 commented 3 years ago

@nixpanic can this be done in 3.1.0? or do we need to move it out to the next release?

humblec commented 3 years ago

Moving this from release 3.1.0

humblec commented 3 years ago

@yati1998 is this something you would like to explore ?

yati1998 commented 3 years ago

@humblec sure I will take a look in this.

yati1998 commented 3 years ago

@yati1998 is this something you would like to explore ?

@humblec it will be difficult for me to work on this as of now. If it is a priority issue, it will be better to assign it to someone who have experience on this. Sorry for mentioning this so late.

nixpanic commented 3 years ago

I'm moving this out of 3.4 in favour of #2015

stale[bot] commented 2 years ago

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.

humblec commented 2 years ago

/assign @humblec