From fdc74973d894fc38f34b9879cd6d9e56e21ca7c5 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 4 Nov 2024 14:32:26 +0100 Subject: [PATCH] rbd: register GET_CLIENTS_TO_FENCE caps register Capability_NetworkFence_ GET_CLIENTS_TO_FENCE capability and start a NetworkFence controllers as part of rbd nodeplugin. Signed-off-by: Madhu Rajanna --- internal/csi-addons/rbd/identity.go | 7 +++++++ internal/rbd/driver/driver.go | 3 +++ 2 files changed, 10 insertions(+) diff --git a/internal/csi-addons/rbd/identity.go b/internal/csi-addons/rbd/identity.go index 68d7882e6..0e84e9ee0 100644 --- a/internal/csi-addons/rbd/identity.go +++ b/internal/csi-addons/rbd/identity.go @@ -152,6 +152,13 @@ func (is *IdentityServer) GetCapabilities( Type: identity.Capability_EncryptionKeyRotation_ENCRYPTIONKEYROTATION, }, }, + }, + &identity.Capability{ + Type: &identity.Capability_NetworkFence_{ + NetworkFence: &identity.Capability_NetworkFence{ + Type: identity.Capability_NetworkFence_GET_CLIENTS_TO_FENCE, + }, + }, }) } diff --git a/internal/rbd/driver/driver.go b/internal/rbd/driver/driver.go index 0ad8109f8..0bf6cfe04 100644 --- a/internal/rbd/driver/driver.go +++ b/internal/rbd/driver/driver.go @@ -227,6 +227,9 @@ func (r *Driver) setupCSIAddonsServer(conf *util.Config) error { } if conf.IsNodeServer { + fcs := casrbd.NewFenceControllerServer() + r.cas.RegisterService(fcs) + rs := casrbd.NewReclaimSpaceNodeServer(r.ns.VolumeLocks) r.cas.RegisterService(rs)