allow restarting of decommissioning if completed, failed or canceld (#16464)

This commit is contained in:
Florian Schwab 2023-01-24 16:07:59 +01:00 committed by GitHub
parent ca2a1c3f60
commit d67a846ec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -569,7 +569,10 @@ func (z *erasureServerPools) IsDecommissionRunning() bool {
defer z.poolMetaMutex.RUnlock()
meta := z.poolMeta
for _, pool := range meta.Pools {
if pool.Decommission != nil {
if pool.Decommission != nil &&
!pool.Decommission.Complete &&
!pool.Decommission.Failed &&
!pool.Decommission.Canceled {
return true
}
}