From: Casey Bodley Date: Wed, 29 Mar 2017 18:18:38 +0000 (-0400) Subject: rgw: synchronize period config with period updates X-Git-Tag: v12.0.2~191^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b49b06534345ea5ebba5917ee32395693763aa32;p=ceph.git rgw: synchronize period config with period updates read period config from local storage on RGWPeriod::update(), and write the new config to storage on RGWPeriod::reflect() Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index bcec2bd59a7b..15acc0cc26f8 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -1380,6 +1380,12 @@ int RGWPeriod::update() } } + ret = period_config.read(store, realm_id); + if (ret < 0 && ret != -ENOENT) { + ldout(cct, 0) << "ERROR: failed to read period config: " + << cpp_strerror(ret) << dendl; + return ret; + } return 0; } @@ -1402,6 +1408,13 @@ int RGWPeriod::reflect() } } } + + int r = period_config.write(store, realm_id); + if (r < 0) { + ldout(cct, 0) << "ERROR: failed to store period config: " + << cpp_strerror(-r) << dendl; + return r; + } return 0; }