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: migration of replication service from controller server #3924

Merged
merged 1 commit into from
Jun 23, 2023
Merged

rbd: migration of replication service from controller server #3924

merged 1 commit into from
Jun 23, 2023

Conversation

riya-singhal31
Copy link
Contributor

@riya-singhal31 riya-singhal31 commented Jun 20, 2023

this commit migrates the replication service from controller server in rbd and adds it to csi-addons.

@mergify mergify bot added the component/rbd Issues related to RBD label Jun 20, 2023
@riya-singhal31 riya-singhal31 changed the title [WIP]rbd: migration of replication controller server [WIP]rbd: migration of replication service from controller server Jun 20, 2023
@riya-singhal31 riya-singhal31 marked this pull request as ready for review June 20, 2023 11:12
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.

Comment on lines 85 to 86
// NewReplicationServer creates a new IdentityServer which handles
// the Identity Service requests from the CSI-Addons specification.
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 wrong definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, updated. Thanks.

internal/rbd/driver/driver.go Show resolved Hide resolved
@riya-singhal31 riya-singhal31 changed the title [WIP]rbd: migration of replication service from controller server rbd: migration of replication service from controller server Jun 20, 2023
Copy link
Member

@nixpanic nixpanic left a comment

Choose a reason for hiding this comment

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

looks good to me, except for the comment above the NewReplicationServer() function.

internal/rbd/driver/driver.go Show resolved Hide resolved
@riya-singhal31
Copy link
Contributor Author

pr title still contains WIP.

Can you test it once to make sure nothing is broken ? https://github.com/rook/rook/blob/master/Documentation/Storage-Configuration/Ceph-CSI/ceph-csi-drivers.md#csi-addons-controller

Yes, testing it.

Comment on lines 85 to 89
// NewReplicationServer creates a new ReplicationServer which handles
// the Replication Service requests from the CSI-Addons specification.
func NewReplicationServer() *ReplicationServer {
return &ReplicationServer{}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// NewReplicationServer creates a new ReplicationServer which handles
// the Replication Service requests from the CSI-Addons specification.
func NewReplicationServer() *ReplicationServer {
return &ReplicationServer{}
}
// NewReplicationServer creates a new ReplicationServer which handles
// the Replication Service requests from the CSI-Addons specification.
func NewReplicationServer(c *corerbd.ControllerServer) *ReplicationServer {
return &ReplicationServer{ControllerServer: c}
}

Without the above change, we cannot use the internal locking mechanism. please check this change once again.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for pointing out madhu !

volume locks are initialised way later in New[Controller|Node]Server() calls.

We'll need to move this call

// configre CSI-Addons server and components
err = r.setupCSIAddonsServer(conf)
if err != nil {
log.FatalLogMsg(err.Error())
}

to just before this call to make sure everything is initialized.

s := csicommon.NewNonBlockingGRPCServer()

@riya-singhal31 Please make this change too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated, thanks!

nixpanic
nixpanic previously approved these changes Jun 21, 2023
@mergify mergify bot dismissed nixpanic’s stale review June 22, 2023 08:22

Pull request has been modified.

@Madhu-1 Madhu-1 requested a review from Rakshith-R June 22, 2023 09:40
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Jun 22, 2023

@riya-singhal31 Hope this PR is already tested and working as expected?

@riya-singhal31
Copy link
Contributor Author

@riya-singhal31 Hope this PR is already tested and working as expected?

I'm on it.

@riya-singhal31
Copy link
Contributor Author

riya-singhal31 commented Jun 22, 2023

Tested.
Requesting the reviews.

@riya-singhal31
Copy link
Contributor Author

csiaddons server is running as expected and receiving the requests:

1 replication.go:117] ID: 27 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac mirroringMode is not set in parameters, setting to mirroringMode to default (snapshot)
E0622 16:28:42.441503 1 replication.go:269] ID: 27 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac failed to enable mirroring on "ocs-storagecluster-cephblockpool/csi-vol-e69eee00-3d47-46b5-9e1f-86f3361b16ac" with error: rbd: ret=-22, Invalid argument
E0622 16:28:42.441559 1 utils.go:210] ID: 27 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac GRPC error: rpc error: code = Internal desc = failed to enable mirroring on "ocs-storagecluster-cephblockpool/csi-vol-e69eee00-3d47-46b5-9e1f-86f3361b16ac" with error: rbd: ret=-22, Invalid argument
I0622 16:29:02.942045 1 utils.go:195] ID: 28 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac GRPC call: /replication.Controller/EnableVolumeReplication
I0622 16:29:02.942155 1 utils.go:204] ID: 28 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac GRPC request: {"parameters":{"schedulingInterval":"1m"},"replication_id":"replicationHandle","secrets":"stripped","volume_id":"0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac"}
I0622 16:29:02.946989 1 omap.go:88] ID: 28 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac got omap values: (pool="ocs-storagecluster-cephblockpool", namespace="", name="csi.volume.e69eee00-3d47-46b5-9e1f-86f3361b16ac"): map[csi.imageid:3ad28208e123 csi.imagename:csi-vol-e69eee00-3d47-46b5-9e1f-86f3361b16ac csi.volname:pvc-5bc286d7-19c1-4e24-9ca6-508183d6d585 csi.volume.owner:default]
W0622 16:29:02.972414 1 replication.go:117] ID: 28 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac mirroringMode is not set in parameters, setting to mirroringMode to default (snapshot)
E0622 16:29:03.020184 1 replication.go:269] ID: 28 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac failed to enable mirroring on "ocs-storagecluster-cephblockpool/csi-vol-e69eee00-3d47-46b5-9e1f-86f3361b16ac" with error: rbd: ret=-22, Invalid argument
E0622 16:29:03.020236 1 utils.go:210] ID: 28 Req-ID: 0001-0011-openshift-storage-0000000000000001-e69eee00-3d47-46b5-9e1f-86f3361b16ac GRPC error: rpc error: code = Internal desc = failed to enable mirroring on "ocs-storagecluster-cephblockpool/csi-vol-e69eee00-3d47-46b5-9e1f-86f3361b16ac" with error: rbd: ret=-22, Invalid argument

@Rakshith-R Rakshith-R added ci/skip/e2e skip running e2e CI jobs ci/skip/multi-arch-build skip building on multiple architectures labels Jun 23, 2023
@Rakshith-R
Copy link
Contributor

@Mergifyio queue

@mergify
Copy link
Contributor

mergify bot commented Jun 23, 2023

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at dbdb908

this commit migrates the replication controller server
from internal/rbd and adds it to csi-addons.

Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
@Rakshith-R Rakshith-R linked an issue Jun 23, 2023 that may be closed by this pull request
5 tasks
@mergify mergify bot added the ok-to-test Label to trigger E2E tests label Jun 23, 2023
@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Jun 23, 2023
@mergify mergify bot merged commit dbdb908 into ceph:devel Jun 23, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/skip/e2e skip running e2e CI jobs ci/skip/multi-arch-build skip building on multiple architectures component/rbd Issues related to RBD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rbd: complete migration of volrep to csi-addons
5 participants