From 8ea698425afa5305d40affc8200f91fe7b391277 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Wed, 19 Apr 2017 10:02:58 -0400 Subject: [PATCH] rgw: error more verbosely in RGWRados::create_pool Adds detail when pool creation fails with ERANGE, which can be caused by pool settings. Signed-off-by: Matt Benjamin --- src/rgw/rgw_rados.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index caa84d1449d..b2d910e43a7 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -5307,6 +5307,13 @@ int RGWRados::create_pool(const rgw_pool& pool) ret = rad->pool_create(pool.name.c_str(), 0); if (ret == -EEXIST) ret = 0; + else if (ret == -ERANGE) { + ldout(cct, 0) + << __func__ + << " ERROR: librados::Rados::pool_create returned " << cpp_strerror(-ret) + << " (this can be due to a pool or placement group misconfiguration, e.g., pg_num < pgp_num)" + << dendl; + } if (ret < 0) return ret; -- 2.47.3