mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
rbd: pass CSI-instanceID to CSI-Addons VolumeGroupServer
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
435e26d948
commit
a98edab480
@ -37,12 +37,17 @@ type VolumeGroupServer struct {
|
||||
// if volumegroup spec add more RPC services in the proto file, then we
|
||||
// don't need to add all RPC methods leading to forward compatibility.
|
||||
*volumegroup.UnimplementedControllerServer
|
||||
|
||||
// csiID is the unique ID for this CSI-driver deployment.
|
||||
csiID string
|
||||
}
|
||||
|
||||
// NewVolumeGroupServer creates a new VolumeGroupServer which handles the
|
||||
// VolumeGroup Service requests from the CSI-Addons specification.
|
||||
func NewVolumeGroupServer() *VolumeGroupServer {
|
||||
return &VolumeGroupServer{}
|
||||
func NewVolumeGroupServer(instanceID string) *VolumeGroupServer {
|
||||
return &VolumeGroupServer{
|
||||
csiID: instanceID,
|
||||
}
|
||||
}
|
||||
|
||||
func (vs *VolumeGroupServer) RegisterService(server grpc.ServiceRegistrar) {
|
||||
|
@ -222,7 +222,7 @@ func (r *Driver) setupCSIAddonsServer(conf *util.Config) error {
|
||||
rcs := casrbd.NewReplicationServer(NewControllerServer(r.cd))
|
||||
r.cas.RegisterService(rcs)
|
||||
|
||||
vgcs := casrbd.NewVolumeGroupServer()
|
||||
vgcs := casrbd.NewVolumeGroupServer(conf.InstanceID)
|
||||
r.cas.RegisterService(vgcs)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user