From: Tom Clegg Date: Sat, 20 Apr 2019 21:22:41 +0000 (-0400) Subject: 15112: Report volumes without replicas as "none" in -dump output. X-Git-Tag: 1.4.0~61^2~11 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/8c07074bc91e805e1e98771d7b71e0ecf7f9b896 15112: Report volumes without replicas as "none" in -dump output. ...instead of reporting as "stay" or "none" depending on whether *other* volumes have replicas. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/services/keep-balance/balance.go b/services/keep-balance/balance.go index 836be2e608..9e8ca3a672 100644 --- a/services/keep-balance/balance.go +++ b/services/keep-balance/balance.go @@ -732,17 +732,17 @@ func (bal *Balancer) balanceBlock(blkid arvados.SizedDigest, blk *BlockState) ba From: slot.mnt, }) change = changeTrash - case len(blk.Replicas) == 0: - change = changeNone - case slot.repl == nil && slot.want && !slot.mnt.ReadOnly: + case len(blk.Replicas) > 0 && slot.repl == nil && slot.want && !slot.mnt.ReadOnly: slot.mnt.KeepService.AddPull(Pull{ SizedDigest: blkid, From: blk.Replicas[0].KeepMount.KeepService, To: slot.mnt, }) change = changePull - default: + case slot.repl != nil: change = changeStay + default: + change = changeNone } if bal.Dumper != nil { var mtime int64