Skip to content

Commit 2af3616

Browse files
committed
mgr/DaemonServer: decouple adjust_pgs max from mon_osd_max_creating_pgs
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 <[email protected]>
1 parent 37b6ed2 commit 2af3616

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/common/options/mgr.yaml.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ options:
103103
services:
104104
- mgr
105105
with_legacy: true
106+
- name: mgr_max_pg_creating
107+
type: uint
108+
level: advanced
109+
desc: bound on max creating pgs when acting to create more pgs
110+
default: 1024
111+
services:
112+
- mgr
106113
- name: mgr_module_path
107114
type: str
108115
level: advanced

src/mgr/DaemonServer.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2678,7 +2678,9 @@ void DaemonServer::send_report()
26782678
void DaemonServer::adjust_pgs()
26792679
{
26802680
dout(20) << dendl;
2681-
unsigned max = std::max<int64_t>(1, g_conf()->mon_osd_max_creating_pgs);
2681+
uint64_t max = std::max<uint64_t>(
2682+
1,
2683+
g_conf().get_val<uint64_t>("mgr_max_pg_creating"));
26822684
double max_misplaced = g_conf().get_val<double>("target_max_misplaced_ratio");
26832685
bool aggro = g_conf().get_val<bool>("mgr_debug_aggressive_pg_num_changes");
26842686

0 commit comments

Comments
 (0)