-
Notifications
You must be signed in to change notification settings - Fork 559
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
// NewReplicationServer creates a new IdentityServer which handles | ||
// the Identity Service requests from the CSI-Addons specification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, updated. Thanks.
There was a problem hiding this 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.
Yes, testing it. |
// NewReplicationServer creates a new ReplicationServer which handles | ||
// the Replication Service requests from the CSI-Addons specification. | ||
func NewReplicationServer() *ReplicationServer { | ||
return &ReplicationServer{} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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.
There was a problem hiding this comment.
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
ceph-csi/internal/rbd/driver/driver.go
Lines 108 to 112 in 306bfa2
// 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.
ceph-csi/internal/rbd/driver/driver.go
Lines 182 to 183 in 306bfa2
s := csicommon.NewNonBlockingGRPCServer() |
@riya-singhal31 Please make this change too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, thanks!
@riya-singhal31 Hope this PR is already tested and working as expected? |
I'm on it. |
Tested. |
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) |
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe 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 <[email protected]>
/test ci/centos/k8s-e2e-external-storage/1.25 |
/test ci/centos/k8s-e2e-external-storage/1.26 |
/test ci/centos/k8s-e2e-external-storage/1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.25 |
/test ci/centos/mini-e2e-helm/k8s-1.26 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/mini-e2e/k8s-1.25 |
/test ci/centos/mini-e2e/k8s-1.26 |
/test ci/centos/mini-e2e/k8s-1.27 |
/test ci/centos/upgrade-tests-cephfs |
/test ci/centos/upgrade-tests-rbd |
this commit migrates the replication service from controller server in rbd and adds it to csi-addons.