Project

General

Profile

Actions

Bug #58891

open

multisite reshard: old buckets with num_shards=0 get resharded to a new empty shard

Added by Casey Bodley about 1 year ago. Updated about 1 year ago.

Status:
Pending Backport
Priority:
Immediate
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
reshard backport_processed
Backport:
reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

the new reshard strategy doesn't take into account the old semantics for num_shards=0:

  // Represents the number of bucket index object shards:
  //   - value of 0 indicates there is no sharding (this is by default before this
  //     feature is implemented).
  //   - value of UINT32_T::MAX indicates this is a blind bucket.
  uint32_t num_shards;

Related issues 3 (0 open3 closed)

Related to rgw - Bug #59427: rgw: `radosgw-admin bi list ...` fails with certain bucketsDuplicateJ. Eric Ivancich

Actions
Copied to rgw - Backport #58912: pacific: multisite reshard: old buckets with num_shards=0 get resharded to a new empty shardRejectedCasey BodleyActions
Copied to rgw - Backport #58981: reef: multisite reshard: old buckets with num_shards=0 get resharded to a new empty shardResolvedCasey BodleyActions
Actions #1

Updated by Casey Bodley about 1 year ago

  • Status changed from New to Fix Under Review
  • Assignee set to Casey Bodley
  • Pull request ID set to 50329
Actions #2

Updated by Casey Bodley about 1 year ago

steps to reproduce:

1. vstart

$ MON=1 OSD=1 RGW=1 MGR=0 MDS=0 ../src/vstart.sh -n -d

2. configure bucket_index_max_shards=0 in the zone

$ bin/radosgw-admin zone modify --bucket-index-max-shards 0

3. restart radosgw

$ killall radosgw
$ bin/radosgw -c ceph.conf --log-file=out/radosgw.8000.log --admin-socket=out/radosgw.8000.asok --pid-file=out/radosgw.8000.pid -n client.rgw.8000 --debug-rgw 20

4. create and load a testbucket

$ s3cmd mb s3://testbucket
$ s3cmd sync doc s3://testbucket
upload: 'doc/CTestTestfile.cmake' -> 's3://testbucket/doc/CTestTestfile.cmake'  [1 of 65]                                                                     
 278 of 278   100% in    1s   256.27 B/s  done                                                                                                                
upload: 'doc/cmake_install.cmake' -> 's3://testbucket/doc/cmake_install.cmake'  [2 of 65]
 1402 of 1402   100% in    0s   194.26 KB/s  done
...
upload: 'doc/man/rbdmap.8' -> 's3://testbucket/doc/man/rbdmap.8'  [65 of 65]
 6008 of 6008   100% in    0s   734.78 KB/s  done
Done. Uploaded 4688792 bytes in 1.6 seconds, 2.81 MB/s.

5. verify the bucket has num_shards=0

$ bin/radosgw-admin bucket layout --bucket testbucket
{
    "layout": {
        "resharding": "None",
        "current_index": {
            "gen": 0,
            "layout": {
                "type": "Normal",
                "normal": {
                    "num_shards": 0,
                    "hash_type": "Mod" 
                }
...

6. reshard the bucket

$ bin/radosgw-admin bucket reshard --bucket testbucket --num-shards 5

7. list the bucket

$ s3cmd ls -r s3://testbucket

expected result:

'bucket reshard' and 's3cmd ls' show all objects that were uploaded

actual result:

'bucket reshard' logs "total entries: 0" and 's3cmd ls' lists no objects

Actions #3

Updated by Casey Bodley about 1 year ago

  • Affected Versions v18.0.0 added
Actions #4

Updated by Casey Bodley about 1 year ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

Updated by Backport Bot about 1 year ago

  • Copied to Backport #58912: pacific: multisite reshard: old buckets with num_shards=0 get resharded to a new empty shard added
Actions #6

Updated by Casey Bodley about 1 year ago

  • Backport changed from pacific quincy reef to reef
Actions #7

Updated by Backport Bot about 1 year ago

  • Copied to Backport #58981: reef: multisite reshard: old buckets with num_shards=0 get resharded to a new empty shard added
Actions #8

Updated by Backport Bot about 1 year ago

  • Tags changed from reshard to reshard backport_processed
Actions #9

Updated by J. Eric Ivancich about 1 year ago

  • Related to Bug #59427: rgw: `radosgw-admin bi list ...` fails with certain buckets added
Actions

Also available in: Atom PDF