Skip to content

Commit

Permalink
fix: updated capability response of the controller service (#732)
Browse files Browse the repository at this point in the history
See #327 

SINGLE_NODE_MULTI_WRITER needs to be in the response of the
ControllerGetCapabilities function to correctly integrate support for
SINGLE_NODE_MULTI_WRITER access modes.

This was missing from #725.
  • Loading branch information
lukasmetzner authored Oct 4, 2024
1 parent 9d998b7 commit e806b80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions internal/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ func (s *ControllerService) ControllerGetCapabilities(context.Context, *proto.Co
},
},
},
{
Type: &proto.ControllerServiceCapability_Rpc{
Rpc: &proto.ControllerServiceCapability_RPC{
Type: proto.ControllerServiceCapability_RPC_SINGLE_NODE_MULTI_WRITER,
},
},
},
},
}
return resp, nil
Expand Down
2 changes: 1 addition & 1 deletion internal/driver/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ func TestControllerServiceControllerGetCapabilities(t *testing.T) {
t.Fatal(err)
}

if len(resp.Capabilities) != 4 {
if len(resp.Capabilities) != 5 {
t.Fatalf("unexpected number of capabilities: %d", len(resp.Capabilities))
}
}
Expand Down

0 comments on commit e806b80

Please sign in to comment.