Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: stop realm reloader before store shutdown #35525

Merged
merged 1 commit into from Jul 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/rgw/rgw_main.cc
Expand Up @@ -603,10 +603,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);
std::optional<RGWRealmReloader> reloader(std::in_place, 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)
Expand All @@ -619,6 +620,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;
Expand Down