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

cleanup: use rbd.Manager for fetching volumes in CSI-Addons operations #5092

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

nixpanic
Copy link
Member

ReclaimSpace and EncryptionKeyRotation now use the Volume type instead of the (supposed to be) internal rbdVolume.


Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)

@nixpanic nixpanic added cleanup component/rbd Issues related to RBD labels Jan 20, 2025
@nixpanic nixpanic requested a review from a team January 20, 2025 10:40
@nixpanic nixpanic force-pushed the cleanup/csi-addons/manager branch from f000d07 to b1569c8 Compare January 21, 2025 12:32
@nixpanic nixpanic requested review from Rakshith-R and a team January 21, 2025 12:32
Rakshith-R
Rakshith-R previously approved these changes Jan 24, 2025
Copy link
Contributor

@Rakshith-R Rakshith-R left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

@nixpanic nixpanic requested a review from a team January 24, 2025 08:15
Madhu-1
Madhu-1 previously approved these changes Jan 24, 2025
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Jan 24, 2025

@Mergifyio queue

Copy link
Contributor

mergify bot commented Jan 24, 2025

queue

🛑 The pull request has been removed from the queue default

The following conditions don't match anymore:

  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]

@nixpanic nixpanic force-pushed the cleanup/csi-addons/manager branch from b1569c8 to 8cfe37a Compare January 24, 2025 08:26
@mergify mergify bot added the ok-to-test Label to trigger E2E tests label Jan 24, 2025
@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.32

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.32

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.32

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.31

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.31

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.31

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Jan 24, 2025
@@ -32,11 +32,15 @@ import (

type EncryptionKeyRotationServer struct {
*ekr.UnimplementedEncryptionKeyRotationControllerServer
driver string
Copy link
Contributor

Choose a reason for hiding this comment

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

this is csiID, naming it as driver causes confusion to me. And also everywhere else we have csiID naming lets stick to that?

Copy link
Member Author

@nixpanic nixpanic Jan 24, 2025

Choose a reason for hiding this comment

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

csiID is a very strangely called variable. In the CSI Specification it is the name returned in the IdentityService.GetPluginInfo operation. It is not so much an ID, it is more the name of the driver (for its current deployment). Even in Kubernetes name is what is used, see deploy/rbd/kubernetes/csidriver.yaml.

csiID is also used for variables of the util.CSIIdentifier type, and that is why I prefer a different variable name for the driver-instance.

I'll send a cleanup to rename the csiID variable for the driver-instance, and will call it driverName for clarity.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh, wait, in most cases it is actually the instanceID for the driver to allow multi-tenancy on the same Ceph cluster (it is used as the location of the journal where Ceph-CSI stores its metadata). I'll call it driverInstance instead.

@@ -37,13 +37,18 @@ import (
// of CSI-addons reclaimspace controller service spec.
type ReclaimSpaceControllerServer struct {
*rs.UnimplementedReclaimSpaceControllerServer

driver string
Copy link
Contributor

Choose a reason for hiding this comment

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

here as well

Copy link
Contributor

@iPraveenParihar iPraveenParihar left a comment

Choose a reason for hiding this comment

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

requested changes

Copy link
Contributor

mergify bot commented Jan 24, 2025

This pull request has been removed from the queue for the following reason: pull request dequeued.

Pull request #5092 has been dequeued. The pull request rule doesn't match anymore

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

Introduce `snapshottableVolume` and `csiAddonsVolume` types which group
related functions together.

Signed-off-by: Niels de Vos <[email protected]>
The attribute and variable `csiID` ise used for at least two different
things:

 - name of the driver instance, used for journalling metadata
 - objects of the CSIIdentifier struct, composing a volume-handle

By changing the name of the `csiID` attribute for driver instances to
`driverInstance`, any confusion should be prevented.

Signed-off-by: Niels de Vos <[email protected]>
@nixpanic nixpanic force-pushed the cleanup/csi-addons/manager branch from 8cfe37a to 3f4b385 Compare January 24, 2025 12:47
@mergify mergify bot dismissed stale reviews from Madhu-1 and Rakshith-R January 24, 2025 12:47

Pull request has been modified.

Copy link
Contributor

@iPraveenParihar iPraveenParihar left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@nixpanic nixpanic requested review from Madhu-1, Rakshith-R and a team January 24, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup component/rbd Issues related to RBD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants