History

Avoid listing buckets from a suspended pool (#15283)

Make bucket requests sent after decommissioning is started are not created in a suspended pool. Therefore listing buckets should avoid suspended pools as well.

Anis Elleuch committed 4 years ago

Commit 996cac51 parent 0a8b78c1 file · +4 −1Browse files

Unified · Split

cmd/erasure-server-pool.go+4−1
@@ -1652,7 +1652,10 @@ func (z *erasureServerPools) ListBuckets(ctx context.Context) (buckets []BucketI · 1651 unmodified lines
16521652 if z.SinglePool() {
16531653 buckets, err = z.serverPools[0].ListBuckets(ctx)
16541654 } else {
1655− for _, pool := range z.serverPools {
1655+ for idx, pool := range z.serverPools {
1656+ if z.IsSuspended(idx) {
1657+ continue
1658+ }
16561659 buckets, err = pool.ListBuckets(ctx)
16571660 if err != nil {
16581661 logger.LogIf(ctx, err)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t