diff --git a/cmd/batch-rotate.go b/cmd/batch-rotate.go index ccadaa50f..4bb0a9384 100644 --- a/cmd/batch-rotate.go +++ b/cmd/batch-rotate.go @@ -389,6 +389,17 @@ func (r *BatchJobKeyRotateV1) Start(ctx context.Context, api ObjectLayer, job Ba stopFn(result, err) batchLogIf(ctx, err) success = false + if attempts >= retryAttempts { + auditOptions := AuditLogOptions{ + Event: "KeyRotate", + APIName: "StartBatchJob", + Bucket: result.Bucket, + Object: result.Name, + VersionID: result.VersionID, + Error: err.Error(), + } + auditLogInternal(ctx, auditOptions) + } } else { stopFn(result, nil) }