]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: prevent FLAG_CREATING from getting set pre-nautilus
authorSage Weil <sage@redhat.com>
Fri, 13 Apr 2018 15:26:38 +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 4fefba9e90d2c34e45d350cfae6ac6a2b5764a27..21bde5ba4351579ed70df46b54e593dd9594c0f1 100644 (file)
@@ -1076,8 +1076,14 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t)
     encode(pending_creatings, creatings_bl);
     t->put(OSD_PG_CREATING_PREFIX, "creating", creatings_bl);
 
-    // remove any old POOL_CREATING flags
+    // remove any old (or incompat) POOL_CREATING flags
     for (auto& i : tmp.get_pools()) {
+      if (tmp.require_osd_release < CEPH_RELEASE_NAUTILUS) {
+       // pre-nautilus OSDMaps shouldn't get this flag.
+       if (pending_inc.new_pools.count(i.first)) {
+         pending_inc.new_pools[i.first].flags &= ~pg_pool_t::FLAG_CREATING;
+       }
+      }
       if (i.second.has_flag(pg_pool_t::FLAG_CREATING) &&
          !pending_creatings.still_creating_pool(i.first)) {
        dout(10) << __func__ << " done creating pool " << i.first