summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Courtaut <christophe.courtaut@gmail.com>2013-05-27 17:27:57 +0200
committerYehuda Sadeh <yehuda@inktank.com>2013-05-29 08:32:47 -0700
commitf03a6f2142707292837457e3543b9d80decfe98b (patch)
treef3883c680e9bb9bea5cd94009563cda012ddf96f
parent3e5cead0c54f393149ba519281b22cb6a41ff6b9 (diff)
downloadceph-f03a6f2142707292837457e3543b9d80decfe98b.tar.gz
Fixed default region creation issue
If the default region did not exist, it is created, but the previously created RGWDefaultRegionInfo object is not updated. This fix updates this objects after the default region creation. It was also preventing vstart.sh script to start with -r option. Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com> Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_rados.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 72c8d33970b..05494a407bb 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -158,6 +158,10 @@ int RGWRegion::init(CephContext *_cct, RGWRados *_store, bool setup_region)
r = set_as_default();
if (r < 0)
return r;
+ /*Re attempt to read region info from newly created default region */
+ r = read_default(default_info);
+ if (r < 0)
+ return r;
} else if (r < 0) {
lderr(cct) << "failed reading default region info: " << cpp_strerror(-r) << dendl;
return r;