Skip to content

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

Merged
cbodley merged 1 commit into
ceph:mainfrom
smanjara:wip-archive-delete-bucket
May 25, 2023
Merged

cbodley merged 1 commit into
ceph:mainfrom
smanjara:wip-archive-delete-bucket

Conversation

@smanjara

@smanjara smanjara commented Apr 25, 2023 •

Copy link
Copy Markdown
Contributor

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 <[email protected]>
@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

@cbodley cbodley left a comment

Copy link
Copy Markdown
Contributor

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=?

new_be.bucket.name = new_bucket_name;

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

cbodley commented May 24, 2023

Copy link
Copy Markdown
Contributor

jenkins test make check

1 similar comment
@cbodley

cbodley commented May 25, 2023

Copy link
Copy Markdown
Contributor

jenkins test make check

@cbodley

cbodley commented May 25, 2023

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants