]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/DaemonServer: split should respect inflight creating pgs
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 10 Sep 2018 08:52:05 +0000 (16:52 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 10 Sep 2018 08:58:03 +0000 (16:58 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mgr/DaemonServer.cc

index 4bea42f02c3f7b9b746c1afa5207f954892b5b66..00f480a239c4a698b97c2e2d9f53aa25e7caa581 100644 (file)
@@ -2234,8 +2234,11 @@ void DaemonServer::adjust_pgs()
       if (creating_or_unknown >= max) {
        return;
       }
+      left -= creating_or_unknown;
       dout(10) << "creating_or_unknown " << creating_or_unknown
-              << " max_creating " << max << dendl;
+              << " max_creating " << max
+               << " left " << left
+               << dendl;
       cluster_state.with_osdmap([&](const OSDMap& osdmap) {
          if (pg_map.last_osdmap_epoch != osdmap.get_epoch()) {
            // do nothing if maps aren't in sync
@@ -2331,6 +2334,7 @@ void DaemonServer::adjust_pgs()
                               << " pgs in " << pg_state_string(j.first)
                               << dendl;
                      active = false;
+                      break;
                    }
                  }
                } else {