]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: error more verbosely in RGWRados::create_pool 14642/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 19 Apr 2017 14:02:58 +0000 (10:02 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 19 Apr 2017 14:58:16 +0000 (10:58 -0400)
Adds detail when pool creation fails with ERANGE, which can be
caused by pool settings.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_rados.cc

index caa84d1449defb0b1654cd5d0153c517abd25d3e..b2d910e43a756b8042f18b853a4ce1f40ba1dd1b 100644 (file)
@@ -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;