]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: Record the `service_unique_id`, if present, in the SrviceMap
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 8 Sep 2025 18:19:20 +0000 (14:19 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Thu, 18 Sep 2025 16:47:23 +0000 (12:47 -0400)
For consistency and ease associating the two.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 3a94a7b2ed02d20b2bc839b283e60cf4778f69e4)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/driver/rados/rgw_rados.cc

index c8bf7257f318aebc3110c5fac4fc60c219c04e16..32806feed63fd0c76c69af4b37c867b0a355063a 100644 (file)
@@ -1154,6 +1154,10 @@ int RGWRados::register_to_service_map(const DoutPrefixProvider *dpp, const strin
   metadata["realm_name"] = svc.zone->get_realm().get_name();
   metadata["realm_id"] = svc.zone->get_realm().get_id();
   metadata["id"] = name;
+  auto service_unique_id = cct->_conf.get_val<std::string>("service_unique_id");
+  if (!service_unique_id.empty()) {
+    metadata["service_unique_id"] = std::move(service_unique_id);
+  }
   int ret = rados.service_daemon_register(
     daemon_type,
     stringify(rados.get_instance_id()),