From 65019088a7533cb79c72f34b7f8c08dcd77c1461 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 26 Nov 2024 11:37:41 +0300 Subject: [PATCH] object/put: log meta errors instead of erroring out We don't have this finished yet, so it'd be safer for 0.44.0 to just log any errors, but continue working as it worked before. Signed-off-by: Roman Khimov --- pkg/services/object/put/distributed.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkg/services/object/put/distributed.go b/pkg/services/object/put/distributed.go index a124ae80d8..9cdb2a1824 100644 --- a/pkg/services/object/put/distributed.go +++ b/pkg/services/object/put/distributed.go @@ -165,17 +165,22 @@ func (t *distributedTarget) sendObject(node nodeDesc) error { } if t.localNodeInContainer && !node.local { + // These should technically be errors, but we don't have + // a complete implementation now, so errors are substituted with logs. + var l = x.log.With(zap.Stringer("oid", t.obj.GetID())) + if sig == nil { - return fmt.Errorf("%w: missing object meta signature", apistatus.ErrSignatureVerification) + l.Info("missing object meta signature") + return nil } if !bytes.Equal(sig.PublicKeyBytes(), node.info.PublicKey()) { - return fmt.Errorf("%w: public key differs in object meta signature", apistatus.ErrSignatureVerification) + l.Info("public key differs in object meta signature") + return nil } if !sig.Verify(t.objSharedMeta) { - return fmt.Errorf("%w: %s node did not pass the meta information verification", - apistatus.ErrSignatureVerification, network.StringifyGroup(node.info.AddressGroup())) + l.Info("meta signature verification failed", zap.String("node", network.StringifyGroup(node.info.AddressGroup()))) } }