Skip to content

rgw: remove metadata backend from topic#55152

Closed
cbodley wants to merge 17 commits intoceph:mainfrom
cbodley:wip-rgw-meta-topic
Closed

rgw: remove metadata backend from topic#55152
cbodley wants to merge 17 commits intoceph:mainfrom
cbodley:wip-rgw-meta-topic

Conversation

@cbodley
Copy link
Contributor

@cbodley cbodley commented Jan 11, 2024

based on #54868 - will rebase once that merges. also relates to #54777 which removes metadata backends, but this PR only contains the topic bits

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
  • jenkins test rook e2e

@kchheda3
Copy link
Contributor

Looks great.
Thank you so much !

}


class MetadataObject : public RGWMetadataObject {
Copy link
Contributor

@kchheda3 kchheda3 Jan 12, 2024

Choose a reason for hiding this comment

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

nit:
all these class names should be prefixed with Topic

MetadataObject
MetadataHandler
MetadataLister

Copy link
Contributor

@kchheda3 kchheda3 left a comment

Choose a reason for hiding this comment

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

the persistent queue was not added/deleted on secondary zone, so added the logic inside the metadata handler, as without queue the notifications will not work for persistent topics.
Ideally would have wanted to call addition/deletion function inside the topic:write n topic:remove and remove the call from all other places... this ensures its called from single place as is topic creation and deletion now called at single place for all zones, however add_persistent_topic n remove_persistent_topic need the notification manager to be initialized which is true for all s3 calls, however for radosgw-admin command to remove topics the notification-manager is not turned on and returns error. so added the call inside metadata-handler and not removed the code from other places to add/delete queue

@cbodley
Copy link
Contributor Author

cbodley commented Jan 18, 2024

however add_persistent_topic n remove_persistent_topic need the notification manager to be initialized which is true for all s3 calls

it looks easy enough to remove that dependency on the Manager singleton. remove_persistent_topic() already has an overload without it. i'll give that a try

@kchheda3
Copy link
Contributor

however add_persistent_topic n remove_persistent_topic need the notification manager to be initialized which is true for all s3 calls

it looks easy enough to remove that dependency on the Manager singleton. remove_persistent_topic() already has an overload without it. i'll give that a try

yeah it does have a overload without the Manager, but that overload needs rados_ioctx which we do not have in topic::remove, we could create rados_ioctx pointing to notif_pool a and then delete the Manager::remove_persistent_topic . But i thought that was a bit overkill so i thought of adding it to MetadaHandler.

@cbodley cbodley force-pushed the wip-rgw-meta-topic branch from ba248ea to 84f6227 Compare January 18, 2024 20:46
@cbodley cbodley marked this pull request as ready for review January 19, 2024 16:38
@cbodley cbodley requested a review from a team as a code owner January 19, 2024 16:38
Copy link
Contributor

@kchheda3 kchheda3 left a comment

Choose a reason for hiding this comment

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

Tested the code changes with both bucket notification test and multisite test for v2 and all works good.

@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

kchheda3 and others added 7 commits February 1, 2024 15:54
…n multisite config

Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
…ions in multisite config.

Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
…een bucket and topics.

Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
…ions in multisite config.

Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
both locally and in teuthology

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
v1 could be enabled only in local tests. teuthology tests would run with v2

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley cbodley force-pushed the wip-rgw-meta-topic branch from 73e1929 to 3a092cc Compare February 4, 2024 23:46
make the SiteConfig available to all of RGWRados via svc.site instead
of storing it in sal::RadosStore

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
RGWPubSub constructor takes SiteConfig instead of zonegroup map

replace do_all_zonegroups_support_notification_v2() with a generic
function rgw::all_zonegroups_support() that handles non-realm
configurations too

remove unused sal::ZoneGroup::supports_feature()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
metadata sync ignores entries other than MDLOG_STATUS_COMPLETE, so we
don't need to write separate prepare/complete entries. metadata
mutations can just call complete_entry() on success

Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley cbodley force-pushed the wip-rgw-meta-topic branch from 3a092cc to f8f6b11 Compare February 5, 2024 20:20
formatter->open_object_section("topic");
topic.dump(formatter);
encode_json("subscribed_buckets", subscribed_buckets, formatter);
if (!subscribed_buckets.empty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

probably we should show empty subscribed_buckets [] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, i made this conditional so we could use the same helper function for v1 and v2 topics. should v1 output show the []?

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, i made this conditional so we could use the same helper function for v1 and v2 topics. should v1 output show the []?
v1 does not even have concept of subscribed_buckets, so only for v2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted this back to show_topics_info_v2() instead of sharing with the v1 case

@kchheda3
Copy link
Contributor

kchheda3 commented Feb 6, 2024

looks good after SiteConfig changes

@cbodley cbodley mentioned this pull request Feb 6, 2024
14 tasks
rename read_topics()/write_topics() to 'v1' and only call them from
internal v1 call paths

public get_topics() now calls read_topics_v1() for the v1 case, and does
the paginated listing with driver->meta_list_keys_next() for v2

RGWPSListTopicsOp now uses the NextToken request/response params with
the paginated get_topics(), limiting responses to 100 entries like AWS

'radosgw-admin topic list' also paginates the listing according to
--max-entries to avoid reading everything into memory at once

Signed-off-by: Casey Bodley <cbodley@redhat.com>
the format of topic metadata keys is agnostic to the backend, so the
parsing/formatting functions should be in rgw_pubsub.h

Signed-off-by: Casey Bodley <cbodley@redhat.com>
add a new interface for topic metadata that doesn't depend on metadata
backends. this low-level interface is used by both RadosStore and the
topic metadata handler

remove Driver::delete_bucket_topic_mapping() from sal because the omap
object is deleted internally by rgwrados::topic::remove()

remove the RGWRados::topics_pool_ctx member

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
@cbodley
Copy link
Contributor Author

cbodley commented Mar 8, 2024

merged with #55657

@cbodley cbodley closed this Mar 8, 2024
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.

3 participants