]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: prevent crash in `radosgw-admin bucket object shard ...`
authorJ. Eric Ivancich <ivancich@redhat.com>
Wed, 16 Apr 2025 16:38:33 +0000 (12:38 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 18 Apr 2025 18:19:30 +0000 (14:19 -0400)
commit176b3c8ea844efc354e6defa02ec8617df31eacf
treea37e040a45e0311c0fdfa03010e428f5dcbdd382
parentd19040de5641e351a953fb5c89222eb5fd149b23
rgw: prevent crash in `radosgw-admin bucket object shard ...`

This subcommand is used to ask radosgw-admin which bucket index shard
a given object in a given bucket would have its bucket index entry
on. The user is required to supply the number of shards (i.e., the
command doesn't look that up). If 0 is provided it would result in a
divide by zero runtime exception. Values less than or equal to zero
are now protected.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit a2b76b0e09ece61fd0978411d08d13257fe6ddbe)
src/rgw/driver/rados/rgw_tools.h
src/rgw/rgw_admin.cc
src/rgw/services/svc_bi_rados.h