From feaa9eace7098c343598bf08fb50746a1e8d2deb Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Mon, 10 Oct 2022 14:33:17 +0300 Subject: [PATCH] [#1768] Add healthcheck method to the Tree service Signed-off-by: Anton Nikiforov --- CHANGELOG.md | 1 + pkg/services/tree/service.go | 4 ++++ pkg/services/tree/service.pb.go | Bin 99802 -> 108982 bytes pkg/services/tree/service.proto | 22 ++++++++++++++++++++++ pkg/services/tree/service_grpc.pb.go | Bin 15167 -> 16729 bytes pkg/services/tree/service_neofs.pb.go | Bin 47054 -> 51945 bytes pkg/services/tree/types.pb.go | Bin 9844 -> 9843 bytes 7 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c8dfc6e3..67249c581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Changelog for NeoFS Node - `--timeout` flag in `neofs-cli` subcommands (#1837) - `container nodes` command to output list of nodes for container, grouped by replica (#1704) - Configuration flag to ignore shard in `neofs-node` (#1840) +- Add new RPC `TreeService.Healthcheck` ### Changed - Allow to evacuate shard data with `EvacuateShard` control RPC (#1800) diff --git a/pkg/services/tree/service.go b/pkg/services/tree/service.go index a7b87ee09..aca6b9617 100644 --- a/pkg/services/tree/service.go +++ b/pkg/services/tree/service.go @@ -558,3 +558,7 @@ func (s *Service) getContainerInfo(cid cidSDK.ID, pub []byte) ([]netmapSDK.NodeI } return cntNodes, -1, len(cntNodes), nil } + +func (s *Service) Healthcheck(context.Context, *HealthcheckRequest) (*HealthcheckResponse, error) { + return new(HealthcheckResponse), nil +} diff --git a/pkg/services/tree/service.pb.go b/pkg/services/tree/service.pb.go index 2d30dce79d333809016de7a60413f11948ff8500..e87642e7576edd698254d58b914673433a29c6dd 100644 GIT binary patch delta 4688 zcmbtYdsLKV8b1#(3=G3fM3kFDUbsZV%zQHgLkfWjg4{(>5Ez6Z%?qI51tFo`=(b*; z@;R*+u=eEU)=E2@RHu;IE@#UM-7?nPJ-O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}MW0rj=;d2erF>I+-IN3EB*$v5faOy-BafJe=G(H!xA7A+|^@_iwBgZfPyA$J-L zwep#}*a7FMs2$Qo)r(q-_>`Y>z$yAo2c(lvCtM=OPM4&_^dPzT4|AG6LJnBI3oeth zlcffNVN&g4so*6}GTZ@!G>2d*y|)WNr^<9B?qA i%wCor902L_P80jNT&=@pI!JeZ58r~Z{~v#V&*8r{zlSLR diff --git a/pkg/services/tree/service.proto b/pkg/services/tree/service.proto index e1f8d678c..9bcefbf95 100644 --- a/pkg/services/tree/service.proto +++ b/pkg/services/tree/service.proto @@ -47,6 +47,8 @@ service TreeService { rpc Apply (ApplyRequest) returns (ApplyResponse); // GetOpLog returns a stream of logged operations starting from some height. rpc GetOpLog(GetOpLogRequest) returns (stream GetOpLogResponse); + // Healthcheck is a dummy rpc to check service availability + rpc Healthcheck(HealthcheckRequest) returns (HealthcheckResponse); } message AddRequest { @@ -328,3 +330,23 @@ message GetOpLogResponse { // Response signature. Signature signature = 2; }; + +message HealthcheckResponse { + message Body { + } + + // Response body. + Body body = 1; + // Response signature. + Signature signature = 2; +}; + +message HealthcheckRequest { + message Body { + } + + // Request body. + Body body = 1; + // Request signature. + Signature signature = 2; +} diff --git a/pkg/services/tree/service_grpc.pb.go b/pkg/services/tree/service_grpc.pb.go index fba0bfc0c352ea6e4648c33063fc1b830af1ce79..590f11071ca690b2958b1a9c0729450623029245 100644 GIT binary patch delta 618 zcmdmAcC(3b!i|kLZ?b!G>gy|bq$cK+WF%*#CTA;T7Aqtwq?G37Rw@(~BrBBUD?r4H zQ;W(nlT#HE%Mvql5|c7>GD|ACIFWQtW@MA%M&<|dD~o6$2?V7U7v$#^r*2-!q0cut zUq}W;H5T1G$hs%X@XDiTu;(>H;VW?YZ@wX>$y!e}A891#=ar;Zl;}A_XdMM)2L+`T zmZlb$Xewx+it<5xsiTluRFq$&xk;v;Z8EQ%nmtlTkYn&=1vvD4N2D85z6hpCb Za{|W{6oE+=cab$rKIoT+!vBzJ3jib6X!rmC delta 9 RcmaDkmHFIzrVZz|0{|M~1$F=c diff --git a/pkg/services/tree/types.pb.go b/pkg/services/tree/types.pb.go index 75c56a189f6569782ca3e08d17ea8c7d694e7d6e..29be48744df54c9337d19166864e44127481e825 100644 GIT binary patch delta 18 acmez3^Vw&@>&ZNfl@nhnY;I+IuL1yEvIzSC delta 18 acmezD^TlVv>&dB%@)KWHZ*F0HuL1yHa0ycY