[#349] innerring/audit: Use pivot in container placement

Pivot used to shuffle nodes in the CRUSH tree. This is
required argument. We use container ID value to select
container nodes, so `nil` value produces incorrect placements.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
support/v0.27
Alex Vanin 2021-01-26 19:57:03 +03:00 committed by Alex Vanin
parent 198eb06032
commit 5d7451d388
1 changed files with 3 additions and 1 deletions

View File

@ -58,8 +58,10 @@ func (ap *Processor) processStartAudit(epoch uint64) {
continue
}
pivot := containers[i].ToV2().GetValue()
// find all container nodes for current epoch
nodes, err := nm.GetContainerNodes(cnr.PlacementPolicy(), nil)
nodes, err := nm.GetContainerNodes(cnr.PlacementPolicy(), pivot)
if err != nil {
log.Info("can't build placement for container, ignore",
zap.Stringer("cid", containers[i]),