Skip to content

Commit

Permalink
satellite/audit: add missing logs for audit failure conditions
Browse files Browse the repository at this point in the history
Among other conditions, nodes fail audits by returning incorrect
data and by reaching the max reverify count, but we weren't logging
these events. This commit adds the missing logs.

Change-Id: I80749a7e95e8cb97bc8dd7dac1e523e223114b7f
  • Loading branch information
cam-a authored and Cameron Ayer committed Mar 18, 2021
1 parent 4c1098e commit a044957
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions satellite/audit/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,12 @@ func (reporter *Reporter) recordPendingAudits(ctx context.Context, pendingAudits
failed = append(failed, pendingAudit)
errlist.Add(err)
}
reporter.log.Info("Audit pending",
zap.Stringer("Piece ID", pendingAudit.PieceID),
zap.Stringer("Node ID", pendingAudit.NodeID))
} else {
// record failure -- max reverify count reached
reporter.log.Info("max reverify count reached (audit failed)", zap.Stringer("Node ID", pendingAudit.NodeID))
updateRequests = append(updateRequests, &overlay.UpdateRequest{
NodeID: pendingAudit.NodeID,
AuditOutcome: overlay.AuditFailure,
Expand Down
2 changes: 2 additions & 0 deletions satellite/audit/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ func (verifier *Verifier) Verify(ctx context.Context, path storj.Path, skip map[
}

for _, pieceNum := range pieceNums {
verifier.log.Info("Verify: share data altered (audit failed)",
zap.Stringer("Node ID", shares[pieceNum].NodeID))
failedNodes = append(failedNodes, shares[pieceNum].NodeID)
}

Expand Down

0 comments on commit a044957

Please sign in to comment.