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

rbd-nbd: add tests with different accessModes and volumeModes #2601

Merged
merged 4 commits into from
Nov 23, 2021

Conversation

pkalever
Copy link

Describe what this PR does

  • Added tests using different accessModes and volumeModes for rbd-nbd

    • ReadWriteOnce [RWO]:
      • Currently available tests already cover it.
    • Read Write Many [RWX]:
    • ReadOnlyMany [ROX]:
      • Added tests for Block and Filesystem Volume Modes
  • Added helper functions to use deployment kind objects

Note: This PR doesn't consider the new accessMode ReadWriteOncePod [RWOP], this will be a future item to cover tests for both krbd and nbd.

Related issues

Fixes: #2262

@pkalever pkalever requested review from Madhu-1, nixpanic and a team October 28, 2021 09:58
@pkalever pkalever force-pushed the e2e-RX-tests branch 3 times, most recently from c9b83f3 to 67ac3d4 Compare October 28, 2021 12:35
Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

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

just checking, is it possible to have a common helper function to avoid code duplication?

e2e/deployment.go Outdated Show resolved Hide resolved
e2e/deployment.go Outdated Show resolved Hide resolved
e2e/deployment.go Outdated Show resolved Hide resolved
e2e/deployment.go Outdated Show resolved Hide resolved
e2e/deployment.go Outdated Show resolved Hide resolved
e2e/rbd.go Outdated Show resolved Hide resolved
e2e/rbd.go Outdated Show resolved Hide resolved
@nixpanic nixpanic added component/rbd Issues related to RBD component/testing Additional test cases or CI work labels Oct 29, 2021
@pkalever
Copy link
Author

just checking, is it possible to have a common helper function to avoid code duplication?

Yes! At some point we need to keep efforts on writing more generic code for our e2e, it would be a big refactor of e2e/xyz.go. [which would be a different topic IMO]

Coming to this PR, it's adding tests just like any other test. You might have noticed I have already generalized the code into e2e/deployment.go as much as possible. If you feel like I missed something and we can move some more pieces into a common functions feel free to point it

Thanks!

e2e/deployment.go Show resolved Hide resolved
e2e/deployment.go Outdated Show resolved Hide resolved
examples/rbd/fs-pod-rx.yaml Outdated Show resolved Hide resolved
examples/rbd/block-pod-rx.yaml Outdated Show resolved Hide resolved
examples/rbd/fs-pod-rox.yaml Outdated Show resolved Hide resolved
e2e/rbd.go Outdated Show resolved Hide resolved
@pkalever
Copy link
Author

pkalever commented Nov 3, 2021

@humblec Thanks for the review, the comments are cosmic. AFAIK there is no strict naming convention that we are binding to in e2e, I would love to see if anyone else has objections on the naming.

@pkalever
Copy link
Author

pkalever commented Nov 3, 2021

X Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: IP not available after waiting: machine minikube didn't return IP after 1 minute


https://jenkins-ceph-csi.apps.ocp.ci.centos.org/blue/organizations/jenkins/mini-e2e_k8s-1.21/detail/mini-e2e_k8s-1.21/1651/

@pkalever
Copy link
Author

pkalever commented Nov 3, 2021

/retest ci/centos/mini-e2e/k8s-1.21

@pkalever pkalever requested a review from humblec November 3, 2021 08:12
e2e/deployment.go Outdated Show resolved Hide resolved
@humblec
Copy link
Collaborator

humblec commented Nov 3, 2021

@humblec Thanks for the review, the comments are cosmic. AFAIK there is no strict naming convention that we are binding to in e2e, I would love to see if anyone else has objections on the naming.

@nixpanic wdyt?

e2e/deployment.go Outdated Show resolved Hide resolved
e2e/deployment.go Show resolved Hide resolved
e2e/deployment.go Outdated Show resolved Hide resolved
e2e/deployment.go Show resolved Hide resolved
e2e/deployment.go Outdated Show resolved Hide resolved
e2e/rbd.go Show resolved Hide resolved
examples/rbd/fs-pod-rox.yaml Outdated Show resolved Hide resolved
e2e/deployment.go Outdated Show resolved Hide resolved
@pkalever
Copy link
Author

@nixpanic @humblec @Madhu-1 please review. Thanks!

Copy link
Collaborator

@Madhu-1 Madhu-1 left a comment

Choose a reason for hiding this comment

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

LGTM. need one correction in e2e.

@pkalever
Copy link
Author

LGTM. need one correction in e2e.

@Madhu-1 fixed now, please take a look

Madhu-1
Madhu-1 previously approved these changes Nov 16, 2021
@pkalever
Copy link
Author

/retest ci/centos/mini-e2e-helm/k8s-1.20

X Exiting due to GUEST_PROVISION: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: IP not available after waiting: machine minikube didn't return IP after 1 minute

@pkalever
Copy link
Author

@nixpanic @humblec could you please provide your review. Thanks!

@pkalever
Copy link
Author

@Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented Nov 22, 2021

rebase

✅ Branch has been successfully rebased

@pkalever
Copy link
Author

@Mergifyio refresh

@mergify
Copy link
Contributor

mergify bot commented Nov 23, 2021

refresh

✅ Pull request refreshed

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Nov 23, 2021

added DNM to get #2669 merged which is second in queue.

@Madhu-1 Madhu-1 removed the DNM DO NOT MERGE label Nov 23, 2021
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Nov 23, 2021

removed DNM as #2669 is merged

Prasanna Kumar Kalever added 4 commits November 23, 2021 11:12
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Fixed the order of function parameters

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
…me device

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Add tests for RWX and ROX accessModes for Block and FileSystem Mode
PVCs.

Fixes: ceph#2262
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
@mergify mergify bot merged commit 0fd4db9 into ceph:devel Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/rbd Issues related to RBD component/testing Additional test cases or CI work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nbd-tracker: e2e for all access mode and volume mode
4 participants