]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: do not adjust pg_num until FLAG_CREATING removed from pool
authorSage Weil <sage@redhat.com>
Sat, 7 Apr 2018 02:53:35 +0000 (21:53 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:08:40 +0000 (12:08 -0500)
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 <sage@redhat.com>
src/mgr/DaemonServer.cc

index 7ea22bc9a3fbe5c33b0d24e40ace0730d8b93721..4bea42f02c3f7b9b746c1afa5207f954892b5b66 100644 (file)
@@ -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()