]> 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
authorAnthony D'Atri <anthony.datri@indexexchange.com>
Thu, 1 Dec 2022 19:04:30 +0000 (14:04 -0500)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 9 Mar 2023 09:33:58 +0000 (09:33 +0000)
Signed-off-by: Anthony D'Atri <anthony.datri@gmail.com>
Note: This commit is cherry-picked as a dependency
      for later commits in this backport.
(cherry picked from commit 88e8eeca7571fc314bc30a52cd17218fa9fac500)

src/mon/OSDMonitor.cc

index b64da5fb6c9849fa4969ff4a6725088b28ebe12c..63ec78bc24a1abf24fe843e18314f78c6036dd2c 100644 (file)
@@ -7951,15 +7951,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;