rbd: implement GetReplicationDestinationInfo for volumes and groups - #6366
Conversation
cef70f8 to
6180c2c
Compare
|
Testing: |
| req *replication.GetReplicationDestinationInfoRequest, | ||
| ) (*replication.GetReplicationDestinationInfoResponse, error) { | ||
| // Validate request | ||
| if req.GetReplicationSource() == nil { |
There was a problem hiding this comment.
why not validate for empty secrets too?
4451914 to
2ffd5f3
Compare
2ffd5f3 to
79d9e7a
Compare
|
Maybe rename this PR to something like this? rbd: implement GetReplicationDestinationInfo for volumes and groups |
79d9e7a to
486d005
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support in the RBD CSI-Addons replication service for the new GetReplicationDestinationInfo RPC, enabling DR orchestrators to map source volume/volume-group CSI IDs to their corresponding destination IDs across mirrored clusters (including optional pool ID remapping via ConfigMap).
Changes:
- Vendor-bump
github.com/csi-addons/specand regenerate protobuf/grpc stubs to include the new RPC + capability enum. - Implement
GetReplicationDestinationInfoin the RBD CSI-Addons replication server for both volumes and volume groups, includingreplicationDestinationConfigMap schema support. - Extend cluster mapping utilities/tests and add unit tests for destination-ID mapping and basic RPC request validation.
Reviewed changes
Copilot reviewed 10 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/csi-addons/rbd/replication.go | Implements the new RPC and ID mapping helper for volumes and volume groups. |
| internal/csi-addons/rbd/replication_destination_test.go | Adds unit tests for destination ID mapping logic and request validation. |
| internal/csi-addons/rbd/identity.go | Advertises the new CSI-Addons replication capability. |
| internal/util/csiconfig.go | Adds accessor for replication destination config from CSI config. |
| internal/util/cluster_mapping.go | Adds helper to resolve mapped cluster IDs (cluster-mapping.json). |
| internal/util/cluster_mapping_test.go | Adds unit tests for mapped cluster ID resolution. |
| api/deploy/kubernetes/csi-config-map.go | Extends CSI config schema with replication destination configuration. |
| vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/csi-config-map.go | Vendored copy of the CSI config schema update. |
| PendingReleaseNotes.md | Documents the new RPC and configuration behavior. |
| docs/design/proposals/replication-destination-info.md | Updates design proposal with capability advertisement details. |
| go.mod / go.sum | Updates dependency version for csi-addons spec. |
| vendor/modules.txt | Updates vendored module versions. |
| vendor/github.com/csi-addons/spec/lib/go/replication/replication.pb.go | Vendored protobuf changes for new messages/types. |
| vendor/github.com/csi-addons/spec/lib/go/replication/replication_grpc.pb.go | Vendored grpc service changes for new RPC. |
| vendor/github.com/csi-addons/spec/lib/go/identity/identity.pb.go | Vendored capability enum update. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
af236c2 to
26e6c47
Compare
| // ReplicationDestination defines the destination cluster for replication. | ||
| // Populated by ceph-csi-operator from ReplicationDestinationConfig CR. | ||
| // +optional | ||
| ReplicationDestination *ReplicationDestinationInfo `json:"replicationDestination,omitempty"` |
There was a problem hiding this comment.
This change should be part of csi: add ReplicationDestinationInfo to ConfigMap schema commit
caae413 to
439a006
Compare
🛑 The pull request rule doesn't match anymoreDetailsThis action has been cancelled. |
Update the replication destination info proposal to document that the GET_REPLICATION_DESTINATION_INFO capability must be advertised via GetCapabilities RPC. This allows DR orchestrators to discover whether the driver supports the GetReplicationDestinationInfo feature. Signed-off-by: Rewant Soni <resoni@redhat.com>
Add ReplicationDestinationInfo, RemoteRBDDetails, and RemotePoolDetails structures to the ClusterInfo ConfigMap schema. This enables CSI driver to map source volume/group IDs to destination volume/group IDs when pool IDs differ across mirrored clusters. Signed-off-by: Rewant Soni <resoni@redhat.com>
Update csi-addons/spec from b5a7205f6a79 to d4a373713b9a to include GetReplicationDestinationInfo RPC definitions for volume and volume group replication. Signed-off-by: Rewant Soni <resoni@redhat.com>
Add GetReplicationDestinationInfo RPC implementation for both volume and volume group replication. This RPC maps source volume/group IDs to destination IDs by using the replicationDestination configuration from the ConfigMap. Signed-off-by: Rewant Soni <resoni@redhat.com>
Add GET_REPLICATION_DESTINATION_INFO to the list of advertised capabilities in GetCapabilities RPC. The capability is advertised on controller servers and applies to both volume and volume group replication, as both are handled by the same Replication Controller service. Signed-off-by: Rewant Soni <resoni@redhat.com>
Add unit tests for GetReplicationDestinationInfo RPC Signed-off-by: Rewant Soni <resoni@redhat.com>
Document the new GetReplicationDestinationInfo RPC feature in the pending release notes for v3.18. This RPC enables DR orchestrators to map source volume/volume group IDs to destination IDs across mirrored clusters when pools have different IDs, supporting both single volumes and volume groups with pool-based mapping configuration. Signed-off-by: Rewant Soni <resoni@redhat.com>
81eaa8f to
aa1b615
Compare
|
/test ci/centos/upgrade-tests-cephfs |
|
/test ci/centos/k8s-e2e-external-storage/1.36 |
|
/test ci/centos/k8s-e2e-external-storage/1.34 |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/mini-e2e-helm/k8s-1.36 |
|
/test ci/centos/mini-e2e-helm/k8s-1.34 |
|
/test ci/centos/mini-e2e/k8s-1.36 |
|
/test ci/centos/mini-e2e/k8s-1.34 |
|
/test ci/centos/k8s-e2e-external-storage/1.35 |
|
/test ci/centos/mini-e2e-helm/k8s-1.35 |
|
/test ci/centos/mini-e2e/k8s-1.35 |
|
/retest ci/centos/mini-e2e/k8s-1.35 |
Failed with |
|
Deprecation notice: This pull request comes from a fork and was queued with |
Merge Queue Status
This pull request spent 35 seconds in the queue, including 5 seconds running CI. Required conditions to merge
|
Describe what this PR does
Implement the change for the GetReplicationDestinationInfo RPC as per the design proposal in #6316
Is there anything that requires special attention
Provide any external context for the change, if any.
Checklist:
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 unrelatedfailure (please report the failure too!)