forked from TrueCloudLab/frostfs-node
[#1043] control: Add ResetEvacuationStatus implementation
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
926cdeb072
commit
31e2396a5f
8 changed files with 1254 additions and 705 deletions
77
pkg/services/control/service_grpc.pb.go
generated
77
pkg/services/control/service_grpc.pb.go
generated
|
@ -19,25 +19,26 @@ import (
|
|||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
ControlService_HealthCheck_FullMethodName = "/control.ControlService/HealthCheck"
|
||||
ControlService_SetNetmapStatus_FullMethodName = "/control.ControlService/SetNetmapStatus"
|
||||
ControlService_DropObjects_FullMethodName = "/control.ControlService/DropObjects"
|
||||
ControlService_ListShards_FullMethodName = "/control.ControlService/ListShards"
|
||||
ControlService_SetShardMode_FullMethodName = "/control.ControlService/SetShardMode"
|
||||
ControlService_SynchronizeTree_FullMethodName = "/control.ControlService/SynchronizeTree"
|
||||
ControlService_EvacuateShard_FullMethodName = "/control.ControlService/EvacuateShard"
|
||||
ControlService_StartShardEvacuation_FullMethodName = "/control.ControlService/StartShardEvacuation"
|
||||
ControlService_GetShardEvacuationStatus_FullMethodName = "/control.ControlService/GetShardEvacuationStatus"
|
||||
ControlService_StopShardEvacuation_FullMethodName = "/control.ControlService/StopShardEvacuation"
|
||||
ControlService_FlushCache_FullMethodName = "/control.ControlService/FlushCache"
|
||||
ControlService_Doctor_FullMethodName = "/control.ControlService/Doctor"
|
||||
ControlService_AddChainLocalOverride_FullMethodName = "/control.ControlService/AddChainLocalOverride"
|
||||
ControlService_GetChainLocalOverride_FullMethodName = "/control.ControlService/GetChainLocalOverride"
|
||||
ControlService_ListChainLocalOverrides_FullMethodName = "/control.ControlService/ListChainLocalOverrides"
|
||||
ControlService_RemoveChainLocalOverride_FullMethodName = "/control.ControlService/RemoveChainLocalOverride"
|
||||
ControlService_ListTargetsLocalOverrides_FullMethodName = "/control.ControlService/ListTargetsLocalOverrides"
|
||||
ControlService_SealWriteCache_FullMethodName = "/control.ControlService/SealWriteCache"
|
||||
ControlService_DetachShards_FullMethodName = "/control.ControlService/DetachShards"
|
||||
ControlService_HealthCheck_FullMethodName = "/control.ControlService/HealthCheck"
|
||||
ControlService_SetNetmapStatus_FullMethodName = "/control.ControlService/SetNetmapStatus"
|
||||
ControlService_DropObjects_FullMethodName = "/control.ControlService/DropObjects"
|
||||
ControlService_ListShards_FullMethodName = "/control.ControlService/ListShards"
|
||||
ControlService_SetShardMode_FullMethodName = "/control.ControlService/SetShardMode"
|
||||
ControlService_SynchronizeTree_FullMethodName = "/control.ControlService/SynchronizeTree"
|
||||
ControlService_EvacuateShard_FullMethodName = "/control.ControlService/EvacuateShard"
|
||||
ControlService_StartShardEvacuation_FullMethodName = "/control.ControlService/StartShardEvacuation"
|
||||
ControlService_GetShardEvacuationStatus_FullMethodName = "/control.ControlService/GetShardEvacuationStatus"
|
||||
ControlService_ResetShardEvacuationStatus_FullMethodName = "/control.ControlService/ResetShardEvacuationStatus"
|
||||
ControlService_StopShardEvacuation_FullMethodName = "/control.ControlService/StopShardEvacuation"
|
||||
ControlService_FlushCache_FullMethodName = "/control.ControlService/FlushCache"
|
||||
ControlService_Doctor_FullMethodName = "/control.ControlService/Doctor"
|
||||
ControlService_AddChainLocalOverride_FullMethodName = "/control.ControlService/AddChainLocalOverride"
|
||||
ControlService_GetChainLocalOverride_FullMethodName = "/control.ControlService/GetChainLocalOverride"
|
||||
ControlService_ListChainLocalOverrides_FullMethodName = "/control.ControlService/ListChainLocalOverrides"
|
||||
ControlService_RemoveChainLocalOverride_FullMethodName = "/control.ControlService/RemoveChainLocalOverride"
|
||||
ControlService_ListTargetsLocalOverrides_FullMethodName = "/control.ControlService/ListTargetsLocalOverrides"
|
||||
ControlService_SealWriteCache_FullMethodName = "/control.ControlService/SealWriteCache"
|
||||
ControlService_DetachShards_FullMethodName = "/control.ControlService/DetachShards"
|
||||
)
|
||||
|
||||
// ControlServiceClient is the client API for ControlService service.
|
||||
|
@ -63,6 +64,8 @@ type ControlServiceClient interface {
|
|||
StartShardEvacuation(ctx context.Context, in *StartShardEvacuationRequest, opts ...grpc.CallOption) (*StartShardEvacuationResponse, error)
|
||||
// GetShardEvacuationStatus returns evacuation status.
|
||||
GetShardEvacuationStatus(ctx context.Context, in *GetShardEvacuationStatusRequest, opts ...grpc.CallOption) (*GetShardEvacuationStatusResponse, error)
|
||||
// ResetShardEvacuationStatus resets evacuation status if there is no running evacuation process.
|
||||
ResetShardEvacuationStatus(ctx context.Context, in *ResetShardEvacuationStatusRequest, opts ...grpc.CallOption) (*ResetShardEvacuationStatusResponse, error)
|
||||
// StopShardEvacuation stops moving all data from one shard to the others.
|
||||
StopShardEvacuation(ctx context.Context, in *StopShardEvacuationRequest, opts ...grpc.CallOption) (*StopShardEvacuationResponse, error)
|
||||
// FlushCache moves all data from one shard to the others.
|
||||
|
@ -174,6 +177,15 @@ func (c *controlServiceClient) GetShardEvacuationStatus(ctx context.Context, in
|
|||
return out, nil
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) ResetShardEvacuationStatus(ctx context.Context, in *ResetShardEvacuationStatusRequest, opts ...grpc.CallOption) (*ResetShardEvacuationStatusResponse, error) {
|
||||
out := new(ResetShardEvacuationStatusResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_ResetShardEvacuationStatus_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *controlServiceClient) StopShardEvacuation(ctx context.Context, in *StopShardEvacuationRequest, opts ...grpc.CallOption) (*StopShardEvacuationResponse, error) {
|
||||
out := new(StopShardEvacuationResponse)
|
||||
err := c.cc.Invoke(ctx, ControlService_StopShardEvacuation_FullMethodName, in, out, opts...)
|
||||
|
@ -287,6 +299,8 @@ type ControlServiceServer interface {
|
|||
StartShardEvacuation(context.Context, *StartShardEvacuationRequest) (*StartShardEvacuationResponse, error)
|
||||
// GetShardEvacuationStatus returns evacuation status.
|
||||
GetShardEvacuationStatus(context.Context, *GetShardEvacuationStatusRequest) (*GetShardEvacuationStatusResponse, error)
|
||||
// ResetShardEvacuationStatus resets evacuation status if there is no running evacuation process.
|
||||
ResetShardEvacuationStatus(context.Context, *ResetShardEvacuationStatusRequest) (*ResetShardEvacuationStatusResponse, error)
|
||||
// StopShardEvacuation stops moving all data from one shard to the others.
|
||||
StopShardEvacuation(context.Context, *StopShardEvacuationRequest) (*StopShardEvacuationResponse, error)
|
||||
// FlushCache moves all data from one shard to the others.
|
||||
|
@ -340,6 +354,9 @@ func (UnimplementedControlServiceServer) StartShardEvacuation(context.Context, *
|
|||
func (UnimplementedControlServiceServer) GetShardEvacuationStatus(context.Context, *GetShardEvacuationStatusRequest) (*GetShardEvacuationStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetShardEvacuationStatus not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) ResetShardEvacuationStatus(context.Context, *ResetShardEvacuationStatusRequest) (*ResetShardEvacuationStatusResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ResetShardEvacuationStatus not implemented")
|
||||
}
|
||||
func (UnimplementedControlServiceServer) StopShardEvacuation(context.Context, *StopShardEvacuationRequest) (*StopShardEvacuationResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method StopShardEvacuation not implemented")
|
||||
}
|
||||
|
@ -544,6 +561,24 @@ func _ControlService_GetShardEvacuationStatus_Handler(srv interface{}, ctx conte
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ControlService_ResetShardEvacuationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ResetShardEvacuationStatusRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ControlServiceServer).ResetShardEvacuationStatus(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ControlService_ResetShardEvacuationStatus_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ControlServiceServer).ResetShardEvacuationStatus(ctx, req.(*ResetShardEvacuationStatusRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ControlService_StopShardEvacuation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StopShardEvacuationRequest)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -767,6 +802,10 @@ var ControlService_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "GetShardEvacuationStatus",
|
||||
Handler: _ControlService_GetShardEvacuationStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ResetShardEvacuationStatus",
|
||||
Handler: _ControlService_ResetShardEvacuationStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "StopShardEvacuation",
|
||||
Handler: _ControlService_StopShardEvacuation_Handler,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue