From 46df8c197799b361994a8883edddb09aa1a46eb5 Mon Sep 17 00:00:00 2001 From: Moby von Briesen Date: Wed, 13 May 2020 11:33:30 -0400 Subject: [PATCH] satellite/gracefulexit: add log message when node fails validation for piece transfer Change-Id: Ic5a53404ceb35003793aebc63637e7f8a58ef259 --- satellite/gracefulexit/endpoint.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/satellite/gracefulexit/endpoint.go b/satellite/gracefulexit/endpoint.go index 9c7a8c288..dd634873b 100644 --- a/satellite/gracefulexit/endpoint.go +++ b/satellite/gracefulexit/endpoint.go @@ -272,6 +272,12 @@ func (endpoint *Endpoint) Process(stream pb.DRPCSatelliteGracefulExit_ProcessStr continue } if ErrInvalidArgument.Has(err) { + messageBytes, marshalErr := pb.Marshal(request) + if marshalErr != nil { + return rpcstatus.Error(rpcstatus.Internal, marshalErr.Error()) + } + endpoint.log.Warn("storagenode failed validation for piece transfer", zap.Stringer("node ID", nodeID), zap.Binary("original message from storagenode", messageBytes), zap.Error(err)) + // immediately fail and complete graceful exit for nodes that fail satellite validation err = endpoint.db.IncrementProgress(ctx, nodeID, 0, 0, 1) if err != nil {