From 66f1a1680ff6260bb4413fbaaf37920e31a0549e Mon Sep 17 00:00:00 2001 From: Yingrong Zhao Date: Tue, 26 Nov 2019 12:32:26 -0500 Subject: [PATCH] add completion receipt to exit-status cli command on storage node (#3650) --- cmd/storagenode/gracefulexit.go | 9 +- pkg/pb/gracefulexit.pb.go | 165 ++++++++++++---------- pkg/pb/gracefulexit.proto | 1 + pkg/pb/referralmanager.pb.go | 3 +- proto.lock | 5 + storagenode/gracefulexit/endpoint.go | 9 +- storagenode/gracefulexit/endpoint_test.go | 2 + 7 files changed, 108 insertions(+), 86 deletions(-) diff --git a/cmd/storagenode/gracefulexit.go b/cmd/storagenode/gracefulexit.go index 93a6b3925..c15fb64af 100644 --- a/cmd/storagenode/gracefulexit.go +++ b/cmd/storagenode/gracefulexit.go @@ -205,13 +205,18 @@ func cmdGracefulExitStatus(cmd *cobra.Command, args []string) (err error) { } func displayExitProgress(w io.Writer, progresses []*pb.ExitProgress) { - fmt.Fprintln(w, "\nDomain Name\tNode ID\tPercent Complete\tSuccessful") + fmt.Fprintln(w, "\nDomain Name\tNode ID\tPercent Complete\tSuccessful\tCompletion Receipt") for _, progress := range progresses { isSuccessful := "N" + receipt := "N/A" if progress.Successful { isSuccessful = "Y" } - fmt.Fprintf(w, "%s\t%s\t%.2f%%\t%s\t\n", progress.GetDomainName(), progress.NodeId.String(), progress.GetPercentComplete(), isSuccessful) + if progress.GetCompletionReceipt() != nil && len(progress.GetCompletionReceipt()) > 0 { + receipt = fmt.Sprintf("%x", progress.GetCompletionReceipt()) + } + + fmt.Fprintf(w, "%s\t%s\t%.2f%%\t%s\t%s\t\n", progress.GetDomainName(), progress.NodeId.String(), progress.GetPercentComplete(), isSuccessful, receipt) } } diff --git a/pkg/pb/gracefulexit.pb.go b/pkg/pb/gracefulexit.pb.go index dd7c0e549..7e3cdefc8 100644 --- a/pkg/pb/gracefulexit.pb.go +++ b/pkg/pb/gracefulexit.pb.go @@ -306,6 +306,7 @@ type ExitProgress struct { NodeId NodeID `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3,customtype=NodeID" json:"node_id"` PercentComplete float32 `protobuf:"fixed32,3,opt,name=percent_complete,json=percentComplete,proto3" json:"percent_complete,omitempty"` Successful bool `protobuf:"varint,4,opt,name=successful,proto3" json:"successful,omitempty"` + CompletionReceipt []byte `protobuf:"bytes,5,opt,name=completion_receipt,json=completionReceipt,proto3" json:"completion_receipt,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -356,6 +357,13 @@ func (m *ExitProgress) GetSuccessful() bool { return false } +func (m *ExitProgress) GetCompletionReceipt() []byte { + if m != nil { + return m.CompletionReceipt + } + return nil +} + type TransferSucceeded struct { OriginalOrderLimit *OrderLimit `protobuf:"bytes,1,opt,name=original_order_limit,json=originalOrderLimit,proto3" json:"original_order_limit,omitempty"` OriginalPieceHash *PieceHash `protobuf:"bytes,2,opt,name=original_piece_hash,json=originalPieceHash,proto3" json:"original_piece_hash,omitempty"` @@ -1067,84 +1075,85 @@ func init() { func init() { proto.RegisterFile("gracefulexit.proto", fileDescriptor_8f0acbf2ce5fa631) } var fileDescriptor_8f0acbf2ce5fa631 = []byte{ - // 1223 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdf, 0x72, 0xdb, 0xc4, - 0x17, 0xb6, 0x9c, 0x36, 0x89, 0x8f, 0x9d, 0xc4, 0xd9, 0xfc, 0xf3, 0xcf, 0x69, 0x6b, 0xff, 0x04, - 0x4c, 0xd3, 0x19, 0x70, 0xc1, 0x40, 0x61, 0xa6, 0x0c, 0x8c, 0x1c, 0xcb, 0xb1, 0xa8, 0x2b, 0xa7, - 0x6b, 0x27, 0x74, 0x98, 0x01, 0x8d, 0x6a, 0x1d, 0x3b, 0x9a, 0xda, 0x92, 0x90, 0xe4, 0x4e, 0x7b, - 0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x0c, 0x71, 0xe5, 0x77, 0xfe, 0x03, 0x15, 0xa6, 0x5f, 0xbf, - 0x80, 0xbd, 0xf8, 0x50, 0xa9, 0xfc, 0xbb, 0xb0, 0x76, 0xea, 0xda, 0x6c, 0x32, 0x22, 0xd5, 0x74, - 0xa8, 0xf9, 0x87, 0xb1, 0x7c, 0x6b, 0x06, 0x31, 0xd3, 0xfc, 0x47, 0xc2, 0xfb, 0x42, 0xe3, 0xda, - 0xd7, 0x59, 0xe7, 0xc9, 0x93, 0xd5, 0x80, 0xae, 0x1f, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x55, - 0x72, 0xec, 0xc3, 0x3b, 0x0c, 0x00, 0x00, + // 1245 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x73, 0xdb, 0x54, + 0x10, 0xb7, 0x9c, 0xe6, 0x8f, 0xd7, 0x4e, 0xe2, 0xbc, 0xfc, 0x33, 0x4e, 0x5b, 0x1b, 0x01, 0xd3, + 0x74, 0x86, 0xba, 0x10, 0xa0, 0x30, 0x53, 0x06, 0x46, 0x8e, 0x95, 0x58, 0x34, 0x95, 0xd3, 0x17, + 0x27, 0x74, 0x98, 0x01, 0x8d, 0x6a, 0x6d, 0x1c, 0x4d, 0x6d, 0x49, 0x48, 0xcf, 0x9d, 0xf6, 0xc2, + 0x81, 0x4f, 0xc0, 0x91, 0x33, 0x9f, 0x06, 0xae, 0xdc, 0x60, 0x86, 0x32, 0x9c, 0xf8, 0x1a, 0xcc, + 0x93, 0x9e, 0x14, 0xc9, 0x76, 0x4c, 0x3b, 0x3d, 0xd9, 0xda, 0xfd, 0xed, 0xbe, 0xdd, 0x7d, 0xfb, + 0xdb, 0xb7, 0x40, 0xfa, 0xbe, 0xd9, 0xc3, 0xf3, 0xd1, 0x00, 0x9f, 0xdb, 0xac, 0xe1, 0xf9, 0x2e, + 0x73, 0x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 0xd6, 0xd5, 0xe4, 0xc3, 0x58, 0xbd, 0x39, 0x86, 0x18, 0x6b, 0xfe, + 0x5d, 0xe9, 0x03, 0xa9, 0x79, 0xed, 0x9b, 0xbc, 0xf7, 0xe4, 0xc9, 0x42, 0x48, 0xd7, 0x8f, 0xfe, + 0x0b, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x34, 0xd5, 0xa1, 0x6a, 0x0c, 0x00, 0x00, } type DRPCNodeGracefulExitClient interface { diff --git a/pkg/pb/gracefulexit.proto b/pkg/pb/gracefulexit.proto index 7a13e65ab..9bda6c2b4 100644 --- a/pkg/pb/gracefulexit.proto +++ b/pkg/pb/gracefulexit.proto @@ -49,6 +49,7 @@ message ExitProgress { bytes node_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; float percent_complete = 3; bool successful = 4; + bytes completion_receipt = 5; } service SatelliteGracefulExit { diff --git a/pkg/pb/referralmanager.pb.go b/pkg/pb/referralmanager.pb.go index 46b32b2be..539ce867e 100644 --- a/pkg/pb/referralmanager.pb.go +++ b/pkg/pb/referralmanager.pb.go @@ -6,11 +6,10 @@ package pb import ( context "context" fmt "fmt" - math "math" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" + math "math" drpc "storj.io/drpc" ) diff --git a/proto.lock b/proto.lock index 317e0eae0..076f90ffc 100644 --- a/proto.lock +++ b/proto.lock @@ -989,6 +989,11 @@ "id": 4, "name": "successful", "type": "bool" + }, + { + "id": 5, + "name": "completion_receipt", + "type": "bytes" } ] }, diff --git a/storagenode/gracefulexit/endpoint.go b/storagenode/gracefulexit/endpoint.go index f91db487f..2772c4c3d 100644 --- a/storagenode/gracefulexit/endpoint.go +++ b/storagenode/gracefulexit/endpoint.go @@ -144,10 +144,11 @@ func (e *Endpoint) GetExitProgress(ctx context.Context, req *pb.GetExitProgressR resp.Progress = append(resp.Progress, &pb.ExitProgress{ - DomainName: domain, - NodeId: progress.SatelliteID, - PercentComplete: percentCompleted, - Successful: hasCompleted, + DomainName: domain, + NodeId: progress.SatelliteID, + PercentComplete: percentCompleted, + Successful: hasCompleted, + CompletionReceipt: progress.CompletionReceipt, }, ) } diff --git a/storagenode/gracefulexit/endpoint_test.go b/storagenode/gracefulexit/endpoint_test.go index a54438bdc..ee24b6f8d 100644 --- a/storagenode/gracefulexit/endpoint_test.go +++ b/storagenode/gracefulexit/endpoint_test.go @@ -98,4 +98,6 @@ func TestGetExitProgress(t *testing.T) { require.Equal(t, progress.GetDomainName(), exitingSatellite.Addr()) require.Equal(t, progress.NodeId, exitingSatellite.ID()) require.EqualValues(t, 20, progress.GetPercentComplete()) + require.False(t, progress.GetSuccessful()) + require.Empty(t, progress.GetCompletionReceipt()) }