From: Sage Weil Date: Thu, 27 Aug 2015 17:05:40 +0000 (-0400) Subject: Merge remote-tracking branch 'gh/wip-osd-compat' X-Git-Tag: v9.1.0~288 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cbe101e7db4265dfaeae3b85d5e7f266c6a1e9d5;p=ceph.git Merge remote-tracking branch 'gh/wip-osd-compat' Reviewed-by: Samuel Just --- cbe101e7db4265dfaeae3b85d5e7f266c6a1e9d5 diff --cc src/mon/OSDMonitor.cc index c47744e2d7c3,6e2f14c20171..25cf3c10e95e --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@@ -1856,20 -1845,26 +1856,40 @@@ bool OSDMonitor::preprocess_boot(MonOpR goto ignore; } + if (any_of(osdmap.get_pools().begin(), + osdmap.get_pools().end(), + [](const std::pair& pool) + { return pool.second.use_gmt_hitset; })) { + assert(osdmap.get_num_up_osds() == 0 || + osdmap.get_up_osd_features() & CEPH_FEATURE_OSD_HITSET_GMT); + if (!(m->osd_features & CEPH_FEATURE_OSD_HITSET_GMT)) { + dout(0) << __func__ << " one or more pools uses GMT hitsets but osd at " + << m->get_orig_source_inst() + << " doesn't announce support -- ignore" << dendl; + goto ignore; + } + } + + // make sure upgrades stop at hammer + // * OSD_PROXY_FEATURES is the last pre-hammer feature + // * MON_METADATA is the first post-hammer feature + if (osdmap.get_num_up_osds() > 0) { + if ((m->osd_features & CEPH_FEATURE_MON_METADATA) && + !(osdmap.get_up_osd_features() & CEPH_FEATURE_OSD_PROXY_FEATURES)) { + mon->clog->info() << "disallowing boot of post-hammer OSD " + << m->get_orig_source_inst() + << " because one or more up OSDs is pre-hammer\n"; + goto ignore; + } + if (!(m->osd_features & CEPH_FEATURE_OSD_PROXY_FEATURES) && + (osdmap.get_up_osd_features() & CEPH_FEATURE_MON_METADATA)) { + mon->clog->info() << "disallowing boot of pre-hammer OSD " + << m->get_orig_source_inst() + << " because all up OSDs are post-hammer\n"; + goto ignore; + } + } + // already booted? if (osdmap.is_up(from) && osdmap.get_inst(from) == m->get_orig_source_inst()) { diff --cc src/os/Transaction.cc index 714623f9eed4,aab9cea139ed..f1deb2595e12 --- a/src/os/Transaction.cc +++ b/src/os/Transaction.cc @@@ -974,12 -931,9 +931,9 @@@ void ObjectStore::Transaction::generate t->clone(c, o1, o3); t->clone_range(c, o1, o2, 1, 12, 99); - t->create_collection(c); + t->create_collection(c, 12); t->collection_move_rename(c, o2, c2, o3); t->remove_collection(c); - t->collection_setattr(c, string("this"), bl); - t->collection_rmattr(c, string("foo")); - t->collection_setattrs(c, m); o.push_back(t); }