Make bucket requests sent after decommissioning is started are not created in a suspended pool. Therefore listing buckets should avoid suspended pools as well.
Unified · Split
| @@ -1652,7 +1652,10 @@ func (z *erasureServerPools) ListBuckets(ctx context.Context) (buckets []BucketI · 1651 unmodified lines | ||
| 1652 | 1652 | if z.SinglePool() { |
| 1653 | 1653 | buckets, err = z.serverPools[0].ListBuckets(ctx) |
| 1654 | 1654 | } else { |
| 1655 | − for _, pool := range z.serverPools { | |
| 1655 | + for idx, pool := range z.serverPools { | |
| 1656 | + if z.IsSuspended(idx) { | |
| 1657 | + continue | |
| 1658 | + } | |
| 1656 | 1659 | buckets, err = pool.ListBuckets(ctx) |
| 1657 | 1660 | if err != nil { |
| 1658 | 1661 | logger.LogIf(ctx, err) |