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

rgw/multisite[archive zone]: fix storing of bucket instance info in the new bucket entrypoint #51219

Merged
merged 1 commit into from May 25, 2023

Conversation

smanjara
Copy link
Contributor

@smanjara smanjara commented Apr 25, 2023

The new bucket instance on archive zone was being inaccessible after deleting source bucket. Fixed by copying the old bucket instance info into the new entrypoint.

Fixes: https://tracker.ceph.com/issues/43221

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

…point in case

of archive zone.

Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
@smanjara smanjara requested a review from a team as a code owner April 25, 2023 21:43
@github-actions github-actions bot added the rgw label Apr 25, 2023
@cbodley cbodley requested a review from yehudasa April 26, 2023 12:01
Copy link
Contributor

@cbodley cbodley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just above, there's a block comment about why this workaround is necessary - to keep the list of user.buckets consistent. can we verify that the renamed bucket is still visible under it's owning user with radosgw-admin bucket list --uid=?

ret = ctl.bucket->store_bucket_instance_info(be.bucket, new_bi, y, dpp, RGWBucketCtl::BucketInstance::PutParams()
ret = ctl.bucket->store_bucket_instance_info(new_be.bucket, new_bi, y, dpp, RGWBucketCtl::BucketInstance::PutParams()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we were updating the existing bucket instance metadata, then deleting it with remove_bucket_instance_info() just below? neither store_bucket_instance_info() nor remove_bucket_instance_info() delete the bucket index objects, but this removal of the bucket instance metadata would effectively orphan the bucket index shards and all of the object versions they contained

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we are only renaming the bucket, is it necessary to clean the bucket index shards?
I can list the objects and do all sorts of get bucket operations on this renamed bucket.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it necessary to clean the bucket index shards?

no. you're right, we still need the index

@smanjara
Copy link
Contributor Author

just above, there's a block comment about why this workaround is necessary - to keep the list of user.buckets consistent. can we verify that the renamed bucket is still visible under it's owning user with radosgw-admin bucket list --uid=?

@cbodley yes, I verified this and I can list the renamed bucket under the user.

@smanjara
Copy link
Contributor Author

$radosgw-admin bucket list --uid=testuser

[
    "test-bucket-deleted-3d37706f8173d983c756d5d108af96f2"
]

$radosgw-admin bucket list --bucket test-bucket-deleted-3d37706f8173d983c756d5d108af96f2

[
    {
        "name": "ceph.conf",
        "instance": "b5X.XXi0D8zk68IIVvnTJWOqmN63SII",
        "ver": {
            "pool": 6,
            "epoch": 1
        },
        "locator": "",
        "exists": true,
        "meta": {
            "category": 1,
            "size": 5638,
            "mtime": "2023-04-27T20:40:17.968148Z",
            "etag": "7342e8d2b50d53ce8d499c9c0a596598",
            "storage_class": "STANDARD",
            "owner": "testuser",
            "owner_display_name": "testuser",
            "content_type": "text/plain",
            "accounted_size": 5638,
            "user_data": "",
            "appendable": false
        },
        "tag": "_2Xc-iJ_RAtrgKMzp4HYxepI2b9sZiJL",
        "flags": 3,
        "pending_map": [],
        "versioned_epoch": 2
    }
]

@cbodley
Copy link
Contributor

cbodley commented May 24, 2023

jenkins test make check

1 similar comment
@cbodley
Copy link
Contributor

cbodley commented May 25, 2023

jenkins test make check

@cbodley
Copy link
Contributor

cbodley commented May 25, 2023

@cbodley cbodley merged commit 6b9f059 into ceph:main May 25, 2023
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants