Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cls/rgw: list_plain_entries() stops before bi_log entries #14981

Merged
merged 1 commit into from May 5, 2017

Conversation

Projects
None yet
3 participants
@cbodley
Copy link
Contributor

cbodley commented May 5, 2017

list_plain_entries() was using encode_obj_versioned_data_key() to set
its end_key, which gives a prefix of BI_BUCKET_OBJ_INSTANCE_INDEX[=2]

that range between start_key and end_key would not only span the
BI_BUCKET_OBJS_INDEX[=0] prefixes, but BI_BUCKET_LOG_INDEX[=1] prefixes
as well. this can result in list_plain_entries() trying and failing to
decode a rgw_bi_log_entry as a rgw_bucket_dir_entry

Fixes: http://tracker.ceph.com/issues/19876

@cbodley cbodley requested review from yehudasa and oritwas May 5, 2017

@cbodley cbodley force-pushed the cbodley:wip-rgw-bi-list-plain branch from 1acc512 to 85ce645 May 5, 2017

cls/rgw: list_plain_entries() stops before bi_log entries
list_plain_entries() was using encode_obj_versioned_data_key() to set
its end_key, which gives a prefix of BI_BUCKET_OBJ_INSTANCE_INDEX[=2]

that range between start_key and end_key would not only span the
BI_BUCKET_OBJS_INDEX[=0] prefixes, but BI_BUCKET_LOG_INDEX[=1] prefixes
as well. this can result in list_plain_entries() trying and failing to
decode a rgw_bi_log_entry as a rgw_bucket_dir_entry

Fixes: http://tracker.ceph.com/issues/19876

Signed-off-by: Casey Bodley <cbodley@redhat.com>

@cbodley cbodley force-pushed the cbodley:wip-rgw-bi-list-plain branch from 85ce645 to b29a163 May 5, 2017

@cbodley

This comment has been minimized.

Copy link
Contributor Author

cbodley commented May 5, 2017

tested with a simple two-zone multisite cluster, after creating a single bucket and uploading some objects. without this fix applied, a radosgw-admin bi list fails with ERROR: bi_list(): (5) Input/output error. with this fix, the command succeeds in listing all expected entries

@yehudasa
Copy link
Member

yehudasa left a comment

lgtm

@oritwas

oritwas approved these changes May 5, 2017

@oritwas oritwas merged commit 0c5b2a9 into ceph:master May 5, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@cbodley cbodley deleted the cbodley:wip-rgw-bi-list-plain branch May 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.