]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: add FLAG_CREATING on upgrade if pools still creating
authorSage Weil <sage@redhat.com>
Fri, 13 Apr 2018 15:26:48 +0000 (10:26 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:08:40 +0000 (12:08 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 21bde5ba4351579ed70df46b54e593dd9594c0f1..5e7a6003f2cb9ecbbc775be628faee86bcc56c83 100644 (file)
@@ -1357,6 +1357,17 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t)
     if (osdmap.require_osd_release < CEPH_RELEASE_NAUTILUS &&
        tmp.require_osd_release >= CEPH_RELEASE_NAUTILUS) {
       dout(10) << __func__ << " first nautilus+ epoch" << dendl;
+      // add creating flags?
+      for (auto& i : tmp.get_pools()) {
+       if (pending_creatings.still_creating_pool(i.first)) {
+         dout(10) << __func__ << " adding CREATING flag to pool " << i.first
+                  << dendl;
+         if (pending_inc.new_pools.count(i.first) == 0) {
+           pending_inc.new_pools[i.first] = i.second;
+         }
+         pending_inc.new_pools[i.first].flags |= pg_pool_t::FLAG_CREATING;
+       }
+      }
     }
   }