]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_main.cc
import 15.2.5
[ceph.git] / ceph / src / rgw / rgw_main.cc
index e50b5a7161a66ecf94b71c1e4bd70eb7fa428d0a..6102d2d621954fe9617013eb51f8c13ec4417800 100644 (file)
@@ -600,10 +600,11 @@ int radosgw_Main(int argc, const char **argv)
   // add a watcher to respond to realm configuration changes
   RGWPeriodPusher pusher(store);
   RGWFrontendPauser pauser(fes, implicit_tenant_context, &pusher);
-  RGWRealmReloader reloader(store, service_map_meta, &pauser);
+  auto reloader = std::make_unique<RGWRealmReloader>(store,
+                                                    service_map_meta, &pauser);
 
   RGWRealmWatcher realm_watcher(g_ceph_context, store->svc()->zone->get_realm());
-  realm_watcher.add_watcher(RGWRealmNotify::Reload, reloader);
+  realm_watcher.add_watcher(RGWRealmNotify::Reload, *reloader);
   realm_watcher.add_watcher(RGWRealmNotify::ZonesNeedPeriod, pusher);
 
 #if defined(HAVE_SYS_PRCTL_H)
@@ -616,6 +617,8 @@ int radosgw_Main(int argc, const char **argv)
 
   derr << "shutting down" << dendl;
 
+  reloader.reset(); // stop the realm reloader
+
   for (list<RGWFrontend *>::iterator liter = fes.begin(); liter != fes.end();
        ++liter) {
     RGWFrontend *fe = *liter;