From: Sage Weil Date: Sat, 7 Apr 2018 02:53:35 +0000 (-0500) Subject: mgr: do not adjust pg_num until FLAG_CREATING removed from pool X-Git-Tag: v14.0.1~371^2~41 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=101671d95a506d4bf3166a6331c9abd0330711a1;p=ceph.git 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 --- 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()