From 101671d95a506d4bf3166a6331c9abd0330711a1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 6 Apr 2018 21:53:35 -0500 Subject: [PATCH] mgr: do not adjust pg_num until FLAG_CREATING removed from pool This is more reliable than looking at PG states because the PG may have gone active and sent a notification to the mon (pg created!) and mgr (new state!) but the mon may not have persisted that information yet. Signed-off-by: Sage Weil --- src/mgr/DaemonServer.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 7ea22bc9a3fbe..4bea42f02c3f7 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -2252,7 +2252,13 @@ void DaemonServer::adjust_pgs() << " pg_num " << p.get_pg_num() << " target " << p.get_pg_num_target() << dendl; - if (p.get_pg_num() != p.get_pg_num_pending()) { + if (p.has_flag(pg_pool_t::FLAG_CREATING)) { + dout(10) << "pool " << i.first + << " target " << p.get_pg_num_target() + << " pg_num " << p.get_pg_num() + << " - still creating initial pgs" + << dendl; + } else if (p.get_pg_num() != p.get_pg_num_pending()) { dout(10) << "pool " << i.first << " target " << p.get_pg_num_target() << " pg_num " << p.get_pg_num() -- 2.39.5