Skip to content

Commit

Permalink
cephfs: expose FenceControllerServer in driver.go to handle the requests
Browse files Browse the repository at this point in the history
Signed-off-by: Riya Singhal <[email protected]>
  • Loading branch information
riya-singhal31 authored and mergify[bot] committed Oct 24, 2023
1 parent 74dfb7b commit 1fc9678
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions internal/cephfs/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ func (fs *Driver) setupCSIAddonsServer(conf *util.Config) error {
is := casceph.NewIdentityServer(conf)
fs.cas.RegisterService(is)

if conf.IsControllerServer {
fcs := casceph.NewFenceControllerServer()
fs.cas.RegisterService(fcs)
}

// start the server, this does not block, it runs a new go-routine
err = fs.cas.Start()
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions internal/csi-addons/cephfs/network_fence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ import (
"context"
"testing"

"github.com/stretchr/testify/assert"

"github.com/csi-addons/spec/lib/go/fence"
"github.com/stretchr/testify/assert"
)

// TestFenceClusterNetwork is a minimal test for the FenceClusterNetwork()
Expand Down

0 comments on commit 1fc9678

Please sign in to comment.