mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
decom: Fix CurrentSize output when generating the status (#19883)
StartSize starts with the raw free space of all disks in the given pool, however during the status, CurrentSize is not showing the current free raw space, as expected at least by `mc admin decom status` since it was written.
This commit is contained in:
parent
44fc707423
commit
b94dd835c9
@ -1327,11 +1327,7 @@ func (z *erasureServerPools) Status(ctx context.Context, idx int) (PoolStatus, e
|
|||||||
poolInfo := z.poolMeta.Pools[idx].Clone()
|
poolInfo := z.poolMeta.Pools[idx].Clone()
|
||||||
if poolInfo.Decommission != nil {
|
if poolInfo.Decommission != nil {
|
||||||
poolInfo.Decommission.TotalSize = pi.Total
|
poolInfo.Decommission.TotalSize = pi.Total
|
||||||
if poolInfo.Decommission.Failed || poolInfo.Decommission.Canceled {
|
|
||||||
poolInfo.Decommission.CurrentSize = pi.Free
|
poolInfo.Decommission.CurrentSize = pi.Free
|
||||||
} else {
|
|
||||||
poolInfo.Decommission.CurrentSize = poolInfo.Decommission.StartSize + poolInfo.Decommission.BytesDone
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
poolInfo.Decommission = &PoolDecommissionInfo{
|
poolInfo.Decommission = &PoolDecommissionInfo{
|
||||||
TotalSize: pi.Total,
|
TotalSize: pi.Total,
|
||||||
|
Loading…
Reference in New Issue
Block a user