From 7d5b826a4acfbc1df6400b8df990ebfed2c64666 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 14 Mar 2024 12:04:08 -0400 Subject: [PATCH] rgw/pubsub: CreateTopic requires notification_v2 for accounts the account's topic index is only updated by writes/deletes to v2 topic metadata Signed-off-by: Casey Bodley --- src/rgw/rgw_rest_pubsub.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest_pubsub.cc b/src/rgw/rgw_rest_pubsub.cc index d4204d686e247..e268a4fadba4e 100644 --- a/src/rgw/rgw_rest_pubsub.cc +++ b/src/rgw/rgw_rest_pubsub.cc @@ -293,7 +293,13 @@ class RGWPSCreateTopicOp : public RGWOp { } if (s->auth.identity->get_account()) { - // account users don't consult the existing owner/policy + // account users don't consult the existing owner/policy, but they do + // require the notification_v2 format to index the topic metadata + if (!rgw::all_zonegroups_support(*s->penv.site, rgw::zone_features::notification_v2)) { + s->err.message = "The 'notification_v2' zone feature must be enabled " + "to create topics in an account"; + return -EINVAL; + } return 0; } -- 2.39.5