Skip to content

Commit

Permalink
object/put: log meta errors instead of erroring out
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
roman-khimov committed Nov 26, 2024
1 parent f90a3d3 commit 6501908
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions pkg/services/object/put/distributed.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Unit tests (ubuntu-22.04, 1.22)

undefined: x

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Build (ubuntu-22.04, linux, amd64)

undefined: x

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Unit tests (macos-14, 1.23)

undefined: x

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Build (macos-14, darwin, amd64)

undefined: x

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Coverage

undefined: x

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Lint / Lint

undefined: x)

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Lint / Lint

undefined: x)

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Lint / Lint

undefined: x)

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Lint / Lint

undefined: x

Check failure on line 170 in pkg/services/object/put/distributed.go

View workflow job for this annotation

GitHub Actions / Build (macos-14, darwin, arm64)

undefined: x

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())))
}
}

Expand Down

0 comments on commit 6501908

Please sign in to comment.