mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +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
|
// 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.
|
// don't need to add all RPC methods leading to forward compatibility.
|
||||||
*volumegroup.UnimplementedControllerServer
|
*volumegroup.UnimplementedControllerServer
|
||||||
|
|
||||||
|
// csiID is the unique ID for this CSI-driver deployment.
|
||||||
|
csiID string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewVolumeGroupServer creates a new VolumeGroupServer which handles the
|
// NewVolumeGroupServer creates a new VolumeGroupServer which handles the
|
||||||
// VolumeGroup Service requests from the CSI-Addons specification.
|
// VolumeGroup Service requests from the CSI-Addons specification.
|
||||||
func NewVolumeGroupServer() *VolumeGroupServer {
|
func NewVolumeGroupServer(instanceID string) *VolumeGroupServer {
|
||||||
return &VolumeGroupServer{}
|
return &VolumeGroupServer{
|
||||||
|
csiID: instanceID,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (vs *VolumeGroupServer) RegisterService(server grpc.ServiceRegistrar) {
|
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))
|
rcs := casrbd.NewReplicationServer(NewControllerServer(r.cd))
|
||||||
r.cas.RegisterService(rcs)
|
r.cas.RegisterService(rcs)
|
||||||
|
|
||||||
vgcs := casrbd.NewVolumeGroupServer()
|
vgcs := casrbd.NewVolumeGroupServer(conf.InstanceID)
|
||||||
r.cas.RegisterService(vgcs)
|
r.cas.RegisterService(vgcs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user