]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/mon: clarify pool creation failure due to max_pgs_per_osd error message 49180/head
authorAnthony D'Atri <anthony.datri@indexexchange.com>
Thu, 1 Dec 2022 19:04:30 +0000 (14:04 -0500)
committerAnthony D'Atri <anthony.datri@indexexchange.com>
Thu, 1 Dec 2022 19:08:58 +0000 (14:08 -0500)
Signed-off-by: Anthony D'Atri <anthony.datri@gmail.com>
src/mon/OSDMonitor.cc

index e9e7ce72a8b1d76689844f8ab2f110c9aa17031b..cbd48fbd27f85a0f3fda991925913b0b2a021a79 100644 (file)
@@ -7938,15 +7938,16 @@ int OSDMonitor::check_pg_num(int64_t pool, int pg_num, int size, int crush_rule,
     }
   }
   auto max_pgs = max_pgs_per_osd * num_osds;
+  auto projected_pgs_per_osd = projected / num_osds;
   if (projected > max_pgs) {
     if (pool >= 0) {
       *ss << "pool id " << pool;
     }
     *ss << " pg_num " << pg_num << " size " << size
-       << " would mean " << projected
-       << " total pgs, which exceeds max " << max_pgs
-       << " (mon_max_pg_per_osd " << max_pgs_per_osd
-       << " * num_in_osds " << num_osds << ")";
+       << " for this new pool would result in " << projected_pgs_per_osd
+       << " cumulative PGs per OSD (" << projected
+       << " total PG replicas on " << num_osds
+       << " 'in' OSDs) which exceeds the mon_max_pg_per_osd value of " << max_pgs_per_osd;
     return -ERANGE;
   }
   return 0;