]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/DaemonServer: decouple adjust_pgs max from mon_osd_max_creating_pgs
authorSamuel Just <sjust@redhat.com>
Wed, 28 Feb 2024 01:52:27 +0000 (17:52 -0800)
committerSamuel Just <sjust@redhat.com>
Wed, 28 Feb 2024 02:00:05 +0000 (18:00 -0800)
The next commit will remove mon_osd_max_creating_pgs as it doesn't
behave correctly in the context of OSDMonitor.  Create a new mgr
specific config to replace it here.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/common/options/mgr.yaml.in
src/mgr/DaemonServer.cc

index 7d7b68035b7d2b8cbd92e2b769ac6ffccca2885b..f29182930b27b782189a770c3b14e004f52ff157 100644 (file)
@@ -103,6 +103,13 @@ options:
   services:
   - mgr
   with_legacy: true
+- name: mgr_max_pg_creating
+  type: uint
+  level: advanced
+  desc: bound on max creating pgs when acting to create more pgs
+  default: 1024
+  services:
+  - mgr
 - name: mgr_module_path
   type: str
   level: advanced
index 29a9acea5332a7790045162661fa17ebb273a1c8..7f9775c93528aa94dbca92a3db80d9d4557202d5 100644 (file)
@@ -2678,7 +2678,9 @@ void DaemonServer::send_report()
 void DaemonServer::adjust_pgs()
 {
   dout(20) << dendl;
-  unsigned max = std::max<int64_t>(1, g_conf()->mon_osd_max_creating_pgs);
+  uint64_t max = std::max<uint64_t>(
+    1,
+    g_conf().get_val<uint64_t>("mgr_max_pg_creating"));
   double max_misplaced = g_conf().get_val<double>("target_max_misplaced_ratio");
   bool aggro = g_conf().get_val<bool>("mgr_debug_aggressive_pg_num_changes");