Skip to content

Commit c658ba1

Browse files
committed
Register the GroupControllerServer
1 parent b8f244e commit c658ba1

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

pkg/hostpath/hostpath.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func NewHostPathDriver(cfg Config) (*hostPath, error) {
123123
func (hp *hostPath) Run() error {
124124
s := NewNonBlockingGRPCServer()
125125
// hp itself implements ControllerServer, NodeServer, and IdentityServer.
126-
s.Start(hp.config.Endpoint, hp, hp, hp)
126+
s.Start(hp.config.Endpoint, hp, hp, hp, hp)
127127
s.Wait()
128128

129129
return nil

pkg/hostpath/server.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ type nonBlockingGRPCServer struct {
4040
cleanup func()
4141
}
4242

43-
func (s *nonBlockingGRPCServer) Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) {
43+
func (s *nonBlockingGRPCServer) Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer, gcs csi.GroupControllerServer) {
4444

4545
s.wg.Add(1)
4646

47-
go s.serve(endpoint, ids, cs, ns)
47+
go s.serve(endpoint, ids, cs, ns, gcs)
4848

4949
return
5050
}
@@ -63,7 +63,7 @@ func (s *nonBlockingGRPCServer) ForceStop() {
6363
s.cleanup()
6464
}
6565

66-
func (s *nonBlockingGRPCServer) serve(ep string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) {
66+
func (s *nonBlockingGRPCServer) serve(ep string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer, gcs csi.GroupControllerServer) {
6767
listener, cleanup, err := endpoint.Listen(ep)
6868
if err != nil {
6969
glog.Fatalf("Failed to listen: %v", err)
@@ -85,6 +85,9 @@ func (s *nonBlockingGRPCServer) serve(ep string, ids csi.IdentityServer, cs csi.
8585
if ns != nil {
8686
csi.RegisterNodeServer(server, ns)
8787
}
88+
if gcs != nil {
89+
csi.RegisterGroupControllerServer(server, gcs)
90+
}
8891

8992
glog.Infof("Listening for connections on address: %#v", listener.Addr())
9093

0 commit comments

Comments
 (0)