[#668] pkg/audit: Skip audit for containers without SG

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
remotes/fyrchik/meta-pebble
Pavel Karpy 2021-07-06 21:12:10 +03:00 committed by Leonard Lyubich
parent 3a7d7bdecd
commit 0bcc505682
1 changed files with 6 additions and 0 deletions

View File

@ -86,6 +86,12 @@ func (ap *Processor) processStartAudit(epoch uint64) {
zap.Stringer("cid", containers[i]),
zap.Int("amount", len(storageGroups)))
// skip audit for containers
// without storage groups
if len(storageGroups) == 0 {
continue
}
auditTask := new(audit.Task).
WithReporter(&epochAuditReporter{
epoch: epoch,