From ce188e8fdf22f2708fce2c11db836a2217c93a5f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 18 Apr 2017 12:59:40 -0400 Subject: [PATCH] osd: pg-remap -> pg-upmap 'remap' is to non-specific a name. In particular, it sounds like it is related to the 'remapped' PG state but in reality it is not related. 'upmap' or 'pg-upmap' is more specific: it maps a pgid to the 'up' set value (or item) Signed-off-by: Sage Weil --- .../jewel-x-singleton/3-thrash/default.yaml | 4 +- .../3-thrash/default.yaml | 4 +- .../stress-split/3-thrash/default.yaml | 4 +- .../3-thrash/default.yaml | 4 +- .../stress-split/3-thrash/default.yaml | 4 +- qa/tasks/ceph_manager.py | 44 +++--- qa/tasks/thrashosds.py | 4 +- src/common/config_opts.h | 2 +- src/mon/MonCommands.h | 16 +-- src/mon/OSDMonitor.cc | 64 ++++----- src/osd/OSDMap.cc | 134 +++++++++--------- src/osd/OSDMap.h | 20 +-- src/test/cli/osdmaptool/help.t | 10 +- src/test/cli/osdmaptool/missing-argument.t | 10 +- src/test/cli/osdmaptool/remap.t | 23 --- src/test/cli/osdmaptool/upmap.t | 23 +++ src/tools/osdmaptool.cc | 107 +++++++------- src/vstart.sh | 2 +- 18 files changed, 240 insertions(+), 239 deletions(-) delete mode 100644 src/test/cli/osdmaptool/remap.t create mode 100644 src/test/cli/osdmaptool/upmap.t diff --git a/qa/suites/rados/upgrade/jewel-x-singleton/3-thrash/default.yaml b/qa/suites/rados/upgrade/jewel-x-singleton/3-thrash/default.yaml index 8785de6c3f245..a83c77dab191d 100644 --- a/qa/suites/rados/upgrade/jewel-x-singleton/3-thrash/default.yaml +++ b/qa/suites/rados/upgrade/jewel-x-singleton/3-thrash/default.yaml @@ -18,6 +18,6 @@ split_tasks: chance_pgnum_grow: 1 chance_pgpnum_fix: 1 chance_thrash_cluster_full: 0 - chance_thrash_pg_remap: 0 - chance_thrash_pg_remap_items: 0 + chance_thrash_pg_upmap: 0 + chance_thrash_pg_upmap_items: 0 - print: "**** done thrashosds 3-thrash" diff --git a/qa/suites/upgrade/jewel-x/stress-split-erasure-code/3-thrash/default.yaml b/qa/suites/upgrade/jewel-x/stress-split-erasure-code/3-thrash/default.yaml index 0272cb94c1449..d3259109ffbee 100644 --- a/qa/suites/upgrade/jewel-x/stress-split-erasure-code/3-thrash/default.yaml +++ b/qa/suites/upgrade/jewel-x/stress-split-erasure-code/3-thrash/default.yaml @@ -18,6 +18,6 @@ stress-tasks: chance_pgpnum_fix: 1 min_in: 4 chance_thrash_cluster_full: 0 - chance_thrash_pg_remap: 0 - chance_thrash_pg_remap_items: 0 + chance_thrash_pg_upmap: 0 + chance_thrash_pg_upmap_items: 0 - print: "**** done thrashosds 3-thrash" diff --git a/qa/suites/upgrade/jewel-x/stress-split/3-thrash/default.yaml b/qa/suites/upgrade/jewel-x/stress-split/3-thrash/default.yaml index 185bdbceb7fea..955a855b00c93 100644 --- a/qa/suites/upgrade/jewel-x/stress-split/3-thrash/default.yaml +++ b/qa/suites/upgrade/jewel-x/stress-split/3-thrash/default.yaml @@ -17,6 +17,6 @@ stress-tasks: chance_pgnum_grow: 1 chance_pgpnum_fix: 1 chance_thrash_cluster_full: 0 - chance_thrash_pg_remap: 0 - chance_thrash_pg_remap_items: 0 + chance_thrash_pg_upmap: 0 + chance_thrash_pg_upmap_items: 0 - print: "**** done thrashosds 3-thrash" diff --git a/qa/suites/upgrade/kraken-x/stress-split-erasure-code/3-thrash/default.yaml b/qa/suites/upgrade/kraken-x/stress-split-erasure-code/3-thrash/default.yaml index 0272cb94c1449..d3259109ffbee 100644 --- a/qa/suites/upgrade/kraken-x/stress-split-erasure-code/3-thrash/default.yaml +++ b/qa/suites/upgrade/kraken-x/stress-split-erasure-code/3-thrash/default.yaml @@ -18,6 +18,6 @@ stress-tasks: chance_pgpnum_fix: 1 min_in: 4 chance_thrash_cluster_full: 0 - chance_thrash_pg_remap: 0 - chance_thrash_pg_remap_items: 0 + chance_thrash_pg_upmap: 0 + chance_thrash_pg_upmap_items: 0 - print: "**** done thrashosds 3-thrash" diff --git a/qa/suites/upgrade/kraken-x/stress-split/3-thrash/default.yaml b/qa/suites/upgrade/kraken-x/stress-split/3-thrash/default.yaml index 185bdbceb7fea..955a855b00c93 100644 --- a/qa/suites/upgrade/kraken-x/stress-split/3-thrash/default.yaml +++ b/qa/suites/upgrade/kraken-x/stress-split/3-thrash/default.yaml @@ -17,6 +17,6 @@ stress-tasks: chance_pgnum_grow: 1 chance_pgpnum_fix: 1 chance_thrash_cluster_full: 0 - chance_thrash_pg_remap: 0 - chance_thrash_pg_remap_items: 0 + chance_thrash_pg_upmap: 0 + chance_thrash_pg_upmap_items: 0 - print: "**** done thrashosds 3-thrash" diff --git a/qa/tasks/ceph_manager.py b/qa/tasks/ceph_manager.py index 8ff2556a7a0e9..694da55825eb5 100644 --- a/qa/tasks/ceph_manager.py +++ b/qa/tasks/ceph_manager.py @@ -123,8 +123,8 @@ def __init__(self, manager, config, logger=None): self.dump_ops_enable = self.config.get('dump_ops_enable') self.noscrub_toggle_delay = self.config.get('noscrub_toggle_delay') self.chance_thrash_cluster_full = self.config.get('chance_thrash_cluster_full', .05) - self.chance_thrash_pg_remap = self.config.get('chance_thrash_pg_remap', 1.0) - self.chance_thrash_pg_remap_items = self.config.get('chance_thrash_pg_remap', 1.0) + self.chance_thrash_pg_upmap = self.config.get('chance_thrash_pg_upmap', 1.0) + self.chance_thrash_pg_upmap_items = self.config.get('chance_thrash_pg_upmap', 1.0) num_osds = self.in_osds + self.out_osds self.max_pgs = self.config.get("max_pgs_per_pool_osd", 1200) * num_osds @@ -507,9 +507,9 @@ def thrash_cluster_full(self): self.log('Setting full ratio back to .95') self.ceph_manager.raw_cluster_cmd('osd', 'set-full-ratio', '.95') - def thrash_pg_remap(self): + def thrash_pg_upmap(self): """ - Install or remove random pg_remap entries in OSDMap + Install or remove random pg_upmap entries in OSDMap """ from random import shuffle out = self.ceph_manager.raw_cluster_cmd('osd', 'dump', '-f', 'json-pretty') @@ -529,27 +529,27 @@ def thrash_pg_remap(self): shuffle(osds) osds = osds[0:n] self.log('Setting %s to %s' % (pgid, osds)) - cmd = ['osd', 'pg-remap', pgid] + [str(x) for x in osds] + cmd = ['osd', 'pg-upmap', pgid] + [str(x) for x in osds] self.log('cmd %s' % cmd) self.ceph_manager.raw_cluster_cmd(*cmd) else: - m = j['pg_remap'] + m = j['pg_upmap'] if len(m) > 0: shuffle(m) pg = m[0]['pgid'] - self.log('Clearing pg_remap on %s' % pg) + self.log('Clearing pg_upmap on %s' % pg) self.ceph_manager.raw_cluster_cmd( 'osd', - 'rm-pg-remap', + 'rm-pg-upmap', pg) else: - self.log('No pg_remap entries; doing nothing') + self.log('No pg_upmap entries; doing nothing') except CommandFailedError: - self.log('Failed to rm-pg-remap, ignoring') + self.log('Failed to rm-pg-upmap, ignoring') - def thrash_pg_remap_items(self): + def thrash_pg_upmap_items(self): """ - Install or remove random pg_remap_items entries in OSDMap + Install or remove random pg_upmap_items entries in OSDMap """ from random import shuffle out = self.ceph_manager.raw_cluster_cmd('osd', 'dump', '-f', 'json-pretty') @@ -569,23 +569,23 @@ def thrash_pg_remap_items(self): shuffle(osds) osds = osds[0:n*2] self.log('Setting %s to %s' % (pgid, osds)) - cmd = ['osd', 'pg-remap-items', pgid] + [str(x) for x in osds] + cmd = ['osd', 'pg-upmap-items', pgid] + [str(x) for x in osds] self.log('cmd %s' % cmd) self.ceph_manager.raw_cluster_cmd(*cmd) else: - m = j['pg_remap_items'] + m = j['pg_upmap_items'] if len(m) > 0: shuffle(m) pg = m[0]['pgid'] - self.log('Clearing pg_remap on %s' % pg) + self.log('Clearing pg_upmap on %s' % pg) self.ceph_manager.raw_cluster_cmd( 'osd', - 'rm-pg-remap-items', + 'rm-pg-upmap-items', pg) else: - self.log('No pg_remap entries; doing nothing') + self.log('No pg_upmap entries; doing nothing') except CommandFailedError: - self.log('Failed to rm-pg-remap-items, ignoring') + self.log('Failed to rm-pg-upmap-items, ignoring') def all_up(self): """ @@ -805,10 +805,10 @@ def choose_action(self): chance_test_backfill_full,)) if self.chance_thrash_cluster_full > 0: actions.append((self.thrash_cluster_full, self.chance_thrash_cluster_full,)) - if self.chance_thrash_pg_remap > 0: - actions.append((self.thrash_pg_remap, self.chance_thrash_pg_remap,)) - if self.chance_thrash_pg_remap_items > 0: - actions.append((self.thrash_pg_remap_items, self.chance_thrash_pg_remap_items,)) + if self.chance_thrash_pg_upmap > 0: + actions.append((self.thrash_pg_upmap, self.chance_thrash_pg_upmap,)) + if self.chance_thrash_pg_upmap_items > 0: + actions.append((self.thrash_pg_upmap_items, self.chance_thrash_pg_upmap_items,)) for key in ['heartbeat_inject_failure', 'filestore_inject_stall']: for scenario in [ diff --git a/qa/tasks/thrashosds.py b/qa/tasks/thrashosds.py index 37c52062b5b22..29fefbc067511 100644 --- a/qa/tasks/thrashosds.py +++ b/qa/tasks/thrashosds.py @@ -122,8 +122,8 @@ def task(ctx, config): chance_thrash_cluster_full: .05 - chance_thrash_pg_remap: 1.0 - chance_thrash_pg_remap_items: 1.0 + chance_thrash_pg_upmap: 1.0 + chance_thrash_pg_upmap_items: 1.0 example: diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 4a74361547e38..a4714304eb294 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -282,7 +282,7 @@ OPTION(mon_osd_max_op_age, OPT_DOUBLE, 32) // max op age before we get conce OPTION(mon_osd_max_split_count, OPT_INT, 32) // largest number of PGs per "involved" OSD to let split create OPTION(mon_osd_allow_primary_temp, OPT_BOOL, false) // allow primary_temp to be set in the osdmap OPTION(mon_osd_allow_primary_affinity, OPT_BOOL, false) // allow primary_affinity to be set in the osdmap -OPTION(mon_osd_allow_pg_remap, OPT_BOOL, false) // allow pg remap to be set in the osdmap +OPTION(mon_osd_allow_pg_upmap, OPT_BOOL, false) // allow pg upmap to be set in the osdmap OPTION(mon_osd_prime_pg_temp, OPT_BOOL, true) // prime osdmap with pg mapping changes OPTION(mon_osd_prime_pg_temp_max_time, OPT_FLOAT, .5) // max time to spend priming OPTION(mon_osd_prime_pg_temp_max_estimate, OPT_FLOAT, .25) // max estimate of pg total before we do all pgs in parallel diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 4e816890820bb..aa63b57b505dd 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -647,24 +647,24 @@ COMMAND("osd pg-temp " \ "name=id,type=CephOsdName,n=N,req=false", \ "set pg_temp mapping pgid:[ [...]] (developers only)", \ "osd", "rw", "cli,rest") -COMMAND("osd pg-remap " \ +COMMAND("osd pg-upmap " \ "name=pgid,type=CephPgid " \ "name=id,type=CephOsdName,n=N", \ - "set pg_remap mapping :[ [...]] primary (developers only)", \ + "set pg_upmap mapping :[ [...]] primary (developers only)", \ "osd", "rw", "cli,rest") -COMMAND("osd rm-pg-remap " \ +COMMAND("osd rm-pg-upmap " \ "name=pgid,type=CephPgid", \ - "clear pg_remap mapping for (developers only)", \ + "clear pg_upmap mapping for (developers only)", \ "osd", "rw", "cli,rest") -COMMAND("osd pg-remap-items " \ +COMMAND("osd pg-upmap-items " \ "name=pgid,type=CephPgid " \ "name=id,type=CephOsdName,n=N", \ - "set pg_remap_items mapping :{ to , [...]} (developers only)", \ + "set pg_upmap_items mapping :{ to , [...]} (developers only)", \ "osd", "rw", "cli,rest") -COMMAND("osd rm-pg-remap-items " \ +COMMAND("osd rm-pg-upmap-items " \ "name=pgid,type=CephPgid", \ - "clear pg_remap_items mapping for (developers only)", \ + "clear pg_upmap_items mapping for (developers only)", \ "osd", "rw", "cli,rest") COMMAND("osd primary-temp " \ "name=pgid,type=CephPgid " \ diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index a1540cd48e4ae..3c303a88e477c 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7219,9 +7219,9 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, pending_inc.new_primary_temp[pgid] = osd; ss << "set " << pgid << " primary_temp mapping to " << osd; goto update; - } else if (prefix == "osd pg-remap") { - if (!g_conf->mon_osd_allow_pg_remap) { - ss << "you must enable 'mon osd allow pg remap = true' on the mons before you can adjust pg_remap. note that pre-luminous clients will no longer be able to communicate with the cluster."; + } else if (prefix == "osd pg-upmap") { + if (!g_conf->mon_osd_allow_pg_upmap) { + ss << "you must enable 'mon osd allow pg upmap = true' on the mons before you can adjust pg_upmap. note that pre-luminous clients will no longer be able to communicate with the cluster."; err = -EPERM; goto reply; } @@ -7248,8 +7248,8 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -ENOENT; goto reply; } - if (pending_inc.new_pg_remap.count(pgid) || - pending_inc.old_pg_remap.count(pgid)) { + if (pending_inc.new_pg_upmap.count(pgid) || + pending_inc.old_pg_upmap.count(pgid)) { dout(10) << __func__ << " waiting for pending update on " << pgid << dendl; wait_for_finished_proposal(op, new C_RetryMessage(this, op)); return true; @@ -7261,22 +7261,22 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -EINVAL; goto reply; } - vector new_pg_remap; + vector new_pg_upmap; for (auto osd : id_vec) { if (osd != CRUSH_ITEM_NONE && !osdmap.exists(osd)) { ss << "osd." << osd << " does not exist"; err = -ENOENT; goto reply; } - new_pg_remap.push_back(osd); + new_pg_upmap.push_back(osd); } - pending_inc.new_pg_remap[pgid] = new_pg_remap; - ss << "set " << pgid << " pg_remap mapping to " << new_pg_remap; + pending_inc.new_pg_upmap[pgid] = new_pg_upmap; + ss << "set " << pgid << " pg_upmap mapping to " << new_pg_upmap; goto update; - } else if (prefix == "osd rm-pg-remap") { - if (!g_conf->mon_osd_allow_pg_remap) { - ss << "you must enable 'mon osd allow pg remap = true' on the mons before you can adjust pg_remap. note that pre-luminous clients will no longer be able to communicate with the cluster."; + } else if (prefix == "osd rm-pg-upmap") { + if (!g_conf->mon_osd_allow_pg_upmap) { + ss << "you must enable 'mon osd allow pg upmap = true' on the mons before you can adjust pg_upmap. note that pre-luminous clients will no longer be able to communicate with the cluster."; err = -EPERM; goto reply; } @@ -7303,19 +7303,19 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -ENOENT; goto reply; } - if (pending_inc.new_pg_remap.count(pgid) || - pending_inc.old_pg_remap.count(pgid)) { + if (pending_inc.new_pg_upmap.count(pgid) || + pending_inc.old_pg_upmap.count(pgid)) { dout(10) << __func__ << " waiting for pending update on " << pgid << dendl; wait_for_finished_proposal(op, new C_RetryMessage(this, op)); return true; } - pending_inc.old_pg_remap.insert(pgid); - ss << "clear " << pgid << " pg_remap mapping"; + pending_inc.old_pg_upmap.insert(pgid); + ss << "clear " << pgid << " pg_upmap mapping"; goto update; - } else if (prefix == "osd pg-remap-items") { - if (!g_conf->mon_osd_allow_pg_remap) { - ss << "you must enable 'mon osd allow pg remap = true' on the mons before you can adjust pg_remap. note that pre-luminous clients will no longer be able to communicate with the cluster."; + } else if (prefix == "osd pg-upmap-items") { + if (!g_conf->mon_osd_allow_pg_upmap) { + ss << "you must enable 'mon osd allow pg upmap = true' on the mons before you can adjust pg_upmap. note that pre-luminous clients will no longer be able to communicate with the cluster."; err = -EPERM; goto reply; } @@ -7342,8 +7342,8 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -ENOENT; goto reply; } - if (pending_inc.new_pg_remap_items.count(pgid) || - pending_inc.old_pg_remap_items.count(pgid)) { + if (pending_inc.new_pg_upmap_items.count(pgid) || + pending_inc.old_pg_upmap_items.count(pgid)) { dout(10) << __func__ << " waiting for pending update on " << pgid << dendl; wait_for_finished_proposal(op, new C_RetryMessage(this, op)); return true; @@ -7360,7 +7360,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -EINVAL; goto reply; } - vector> new_pg_remap_items; + vector> new_pg_upmap_items; for (auto p = id_vec.begin(); p != id_vec.end(); ++p) { int from = *p++; int to = *p; @@ -7374,15 +7374,15 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -ENOENT; goto reply; } - new_pg_remap_items.push_back(make_pair(from, to)); + new_pg_upmap_items.push_back(make_pair(from, to)); } - pending_inc.new_pg_remap_items[pgid] = new_pg_remap_items; - ss << "set " << pgid << " pg_remap_items mapping to " << new_pg_remap_items; + pending_inc.new_pg_upmap_items[pgid] = new_pg_upmap_items; + ss << "set " << pgid << " pg_upmap_items mapping to " << new_pg_upmap_items; goto update; - } else if (prefix == "osd rm-pg-remap-items") { - if (!g_conf->mon_osd_allow_pg_remap) { - ss << "you must enable 'mon osd allow pg remap = true' on the mons before you can adjust pg_remap. note that pre-luminous clients will no longer be able to communicate with the cluster."; + } else if (prefix == "osd rm-pg-upmap-items") { + if (!g_conf->mon_osd_allow_pg_upmap) { + ss << "you must enable 'mon osd allow pg upmap = true' on the mons before you can adjust pg_upmap. note that pre-luminous clients will no longer be able to communicate with the cluster."; err = -EPERM; goto reply; } @@ -7409,15 +7409,15 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -ENOENT; goto reply; } - if (pending_inc.new_pg_remap_items.count(pgid) || - pending_inc.old_pg_remap_items.count(pgid)) { + if (pending_inc.new_pg_upmap_items.count(pgid) || + pending_inc.old_pg_upmap_items.count(pgid)) { dout(10) << __func__ << " waiting for pending update on " << pgid << dendl; wait_for_finished_proposal(op, new C_RetryMessage(this, op)); return true; } - pending_inc.old_pg_remap_items.insert(pgid); - ss << "clear " << pgid << " pg_remap_items mapping"; + pending_inc.old_pg_upmap_items.insert(pgid); + ss << "clear " << pgid << " pg_upmap_items mapping"; goto update; } else if (prefix == "osd primary-affinity") { int64_t id; diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index c4e388f86cfba..f83d384792b6d 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -441,10 +441,10 @@ void OSDMap::Incremental::encode(bufferlist& bl, uint64_t features) const ::encode(new_erasure_code_profiles, bl); ::encode(old_erasure_code_profiles, bl); if (v >= 4) { - ::encode(new_pg_remap, bl); - ::encode(old_pg_remap, bl); - ::encode(new_pg_remap_items, bl); - ::encode(old_pg_remap_items, bl); + ::encode(new_pg_upmap, bl); + ::encode(old_pg_upmap, bl); + ::encode(new_pg_upmap_items, bl); + ::encode(old_pg_upmap_items, bl); } ENCODE_FINISH(bl); // client-usable data } @@ -645,10 +645,10 @@ void OSDMap::Incremental::decode(bufferlist::iterator& bl) old_erasure_code_profiles.clear(); } if (struct_v >= 4) { - ::decode(new_pg_remap, bl); - ::decode(old_pg_remap, bl); - ::decode(new_pg_remap_items, bl); - ::decode(old_pg_remap_items, bl); + ::decode(new_pg_upmap, bl); + ::decode(old_pg_upmap, bl); + ::decode(new_pg_upmap_items, bl); + ::decode(old_pg_upmap_items, bl); } DECODE_FINISH(bl); // client-usable data } @@ -822,8 +822,8 @@ void OSDMap::Incremental::dump(Formatter *f) const } f->close_section(); // primary_temp - f->open_array_section("new_pg_remap"); - for (auto& i : new_pg_remap) { + f->open_array_section("new_pg_upmap"); + for (auto& i : new_pg_upmap) { f->open_object_section("mapping"); f->dump_stream("pgid") << i.first; f->open_array_section("osds"); @@ -834,14 +834,14 @@ void OSDMap::Incremental::dump(Formatter *f) const f->close_section(); } f->close_section(); - f->open_array_section("old_pg_remap"); - for (auto& i : old_pg_remap) { + f->open_array_section("old_pg_upmap"); + for (auto& i : old_pg_upmap) { f->dump_stream("pgid") << i; } f->close_section(); - f->open_array_section("new_pg_remap_items"); - for (auto& i : new_pg_remap_items) { + f->open_array_section("new_pg_upmap_items"); + for (auto& i : new_pg_upmap_items) { f->open_object_section("mapping"); f->dump_stream("pgid") << i.first; f->open_array_section("mappings"); @@ -855,8 +855,8 @@ void OSDMap::Incremental::dump(Formatter *f) const f->close_section(); } f->close_section(); - f->open_array_section("old_pg_remap_items"); - for (auto& i : old_pg_remap_items) { + f->open_array_section("old_pg_upmap_items"); + for (auto& i : old_pg_upmap_items) { f->dump_stream("pgid") << i; } f->close_section(); @@ -1128,7 +1128,7 @@ uint64_t OSDMap::get_features(int entity_type, uint64_t *pmask) const features |= CEPH_FEATURE_CRUSH_TUNABLES5; mask |= CEPH_FEATURES_CRUSH; - if (!pg_remap.empty() || !pg_remap_items.empty()) + if (!pg_upmap.empty() || !pg_upmap_items.empty()) features |= CEPH_FEATUREMASK_OSDMAP_REMAP; mask |= CEPH_FEATUREMASK_OSDMAP_REMAP; @@ -1540,17 +1540,17 @@ int OSDMap::apply_incremental(const Incremental &inc) (*primary_temp)[p->first] = p->second; } - for (auto& p : inc.new_pg_remap) { - pg_remap[p.first] = p.second; + for (auto& p : inc.new_pg_upmap) { + pg_upmap[p.first] = p.second; } - for (auto& pg : inc.old_pg_remap) { - pg_remap.erase(pg); + for (auto& pg : inc.old_pg_upmap) { + pg_upmap.erase(pg); } - for (auto& p : inc.new_pg_remap_items) { - pg_remap_items[p.first] = p.second; + for (auto& p : inc.new_pg_upmap_items) { + pg_upmap_items[p.first] = p.second; } - for (auto& pg : inc.old_pg_remap_items) { - pg_remap_items.erase(pg); + for (auto& pg : inc.old_pg_upmap_items) { + pg_upmap_items.erase(pg); } // blacklist @@ -1697,8 +1697,8 @@ int OSDMap::_pick_primary(const vector& osds) const void OSDMap::_apply_remap(const pg_pool_t& pi, pg_t raw_pg, vector *raw) const { pg_t pg = pi.raw_pg_to_pg(raw_pg); - auto p = pg_remap.find(pg); - if (p != pg_remap.end()) { + auto p = pg_upmap.find(pg); + if (p != pg_upmap.end()) { // make sure targets aren't marked out for (auto osd : p->second) { if (osd != CRUSH_ITEM_NONE && osd < max_osd && osd_weight[osd] == 0) { @@ -1710,8 +1710,8 @@ void OSDMap::_apply_remap(const pg_pool_t& pi, pg_t raw_pg, vector *raw) co return; } - auto q = pg_remap_items.find(pg); - if (q != pg_remap_items.end()) { + auto q = pg_upmap_items.find(pg); + if (q != pg_upmap_items.end()) { // NOTE: this approach does not allow a bidirectional swap, // e.g., [[1,2],[2,1]] applied to [0,1,2] -> [0,2,1]. for (auto& r : q->second) { @@ -2138,11 +2138,11 @@ void OSDMap::encode(bufferlist& bl, uint64_t features) const ::encode(erasure_code_profiles, bl); if (v >= 4) { - ::encode(pg_remap, bl); - ::encode(pg_remap_items, bl); + ::encode(pg_upmap, bl); + ::encode(pg_upmap_items, bl); } else { - assert(pg_remap.empty()); - assert(pg_remap_items.empty()); + assert(pg_upmap.empty()); + assert(pg_upmap_items.empty()); } ENCODE_FINISH(bl); // client-usable data } @@ -2380,11 +2380,11 @@ void OSDMap::decode(bufferlist::iterator& bl) erasure_code_profiles.clear(); } if (struct_v >= 4) { - ::decode(pg_remap, bl); - ::decode(pg_remap_items, bl); + ::decode(pg_upmap, bl); + ::decode(pg_upmap_items, bl); } else { - pg_remap.clear(); - pg_remap_items.clear(); + pg_upmap.clear(); + pg_upmap_items.clear(); } DECODE_FINISH(bl); // client-usable data } @@ -2537,8 +2537,8 @@ void OSDMap::dump(Formatter *f) const } f->close_section(); - f->open_array_section("pg_remap"); - for (auto& p : pg_remap) { + f->open_array_section("pg_upmap"); + for (auto& p : pg_upmap) { f->open_object_section("mapping"); f->dump_stream("pgid") << p.first; f->open_array_section("osds"); @@ -2549,8 +2549,8 @@ void OSDMap::dump(Formatter *f) const f->close_section(); } f->close_section(); - f->open_array_section("pg_remap_items"); - for (auto& p : pg_remap_items) { + f->open_array_section("pg_upmap_items"); + for (auto& p : pg_upmap_items) { f->open_object_section("mapping"); f->dump_stream("pgid") << p.first; f->open_array_section("mappings"); @@ -2731,11 +2731,11 @@ void OSDMap::print(ostream& out) const } out << std::endl; - for (auto& p : pg_remap) { - out << "pg_remap " << p.first << " " << p.second << "\n"; + for (auto& p : pg_upmap) { + out << "pg_upmap " << p.first << " " << p.second << "\n"; } - for (auto& p : pg_remap_items) { - out << "pg_remap_items " << p.first << " " << p.second << "\n"; + for (auto& p : pg_upmap_items) { + out << "pg_upmap_items " << p.first << " " << p.second << "\n"; } for (map >::const_iterator p = pg_temp->begin(); @@ -3316,24 +3316,24 @@ int OSDMap::summarize_mapping_stats( } -int OSDMap::clean_remaps( +int OSDMap::clean_pg_upmaps( CephContext *cct, Incremental *pending_inc) { ldout(cct, 10) << __func__ << dendl; int changed = 0; - for (auto& p : pg_remap) { + for (auto& p : pg_upmap) { vector raw; int primary; pg_to_raw_osds(p.first, &raw, &primary); if (raw == p.second) { - ldout(cct, 10) << " removing redundant pg_remap " << p.first << " " + ldout(cct, 10) << " removing redundant pg_upmap " << p.first << " " << p.second << dendl; - pending_inc->old_pg_remap.insert(p.first); + pending_inc->old_pg_upmap.insert(p.first); ++changed; } } - for (auto& p : pg_remap_items) { + for (auto& p : pg_upmap_items) { vector raw; int primary; pg_to_raw_osds(p.first, &raw, &primary); @@ -3344,21 +3344,21 @@ int OSDMap::clean_remaps( } } if (newmap.empty()) { - ldout(cct, 10) << " removing no-op pg_remap_items " << p.first << " " + ldout(cct, 10) << " removing no-op pg_upmap_items " << p.first << " " << p.second << dendl; - pending_inc->old_pg_remap_items.insert(p.first); + pending_inc->old_pg_upmap_items.insert(p.first); ++changed; } else if (newmap != p.second) { - ldout(cct, 10) << " simplifying partially no-op pg_remap_items " + ldout(cct, 10) << " simplifying partially no-op pg_upmap_items " << p.first << " " << p.second << " -> " << newmap << dendl; - pending_inc->new_pg_remap_items[p.first] = newmap; + pending_inc->new_pg_upmap_items[p.first] = newmap; ++changed; } } return changed; } -bool OSDMap::try_pg_remap( +bool OSDMap::try_pg_upmap( CephContext *cct, pg_t pg, ///< pg to potentially remap const set& overfull, ///< osds we'd want to evacuate @@ -3403,7 +3403,7 @@ bool OSDMap::try_pg_remap( return true; } -int OSDMap::remap_pgs( +int OSDMap::calc_pg_upmaps( CephContext *cct, float max_deviation, int max, @@ -3500,14 +3500,14 @@ int OSDMap::remap_pgs( // look for remaps we can un-remap for (auto pg : pgs) { - auto p = tmp.pg_remap_items.find(pg); - if (p != tmp.pg_remap_items.end()) { + auto p = tmp.pg_upmap_items.find(pg); + if (p != tmp.pg_upmap_items.end()) { for (auto q : p->second) { if (q.second == osd) { - ldout(cct, 10) << " dropping pg_remap_items " << pg + ldout(cct, 10) << " dropping pg_upmap_items " << pg << " " << p->second << dendl; - tmp.pg_remap_items.erase(p); - pending_inc->old_pg_remap_items.insert(pg); + tmp.pg_upmap_items.erase(p); + pending_inc->old_pg_upmap_items.insert(pg); ++num_changed; restart = true; } @@ -3520,14 +3520,14 @@ int OSDMap::remap_pgs( break; for (auto pg : pgs) { - if (tmp.pg_remap.count(pg) || - tmp.pg_remap_items.count(pg)) { + if (tmp.pg_upmap.count(pg) || + tmp.pg_upmap_items.count(pg)) { ldout(cct, 20) << " already remapped " << pg << dendl; continue; } ldout(cct, 10) << " trying " << pg << dendl; vector orig, out; - if (!try_pg_remap(cct, pg, overfull, underfull, &orig, &out)) { + if (!try_pg_upmap(cct, pg, overfull, underfull, &orig, &out)) { continue; } ldout(cct, 10) << " " << pg << " " << orig << " -> " << out << dendl; @@ -3535,14 +3535,14 @@ int OSDMap::remap_pgs( continue; } assert(orig != out); - vector>& rmi = tmp.pg_remap_items[pg]; + vector>& rmi = tmp.pg_upmap_items[pg]; for (unsigned i = 0; i < out.size(); ++i) { if (orig[i] != out[i]) { rmi.push_back(make_pair(orig[i], out[i])); } } - pending_inc->new_pg_remap_items[pg] = rmi; - ldout(cct, 10) << " " << pg << " pg_remap_items " << rmi << dendl; + pending_inc->new_pg_upmap_items[pg] = rmi; + ldout(cct, 10) << " " << pg << " pg_upmap_items " << rmi << dendl; restart = true; ++num_changed; break; diff --git a/src/osd/OSDMap.h b/src/osd/OSDMap.h index eb0399edda6e9..0daf00554d071 100644 --- a/src/osd/OSDMap.h +++ b/src/osd/OSDMap.h @@ -148,9 +148,9 @@ class OSDMap { map new_hb_back_up; map new_hb_front_up; - map> new_pg_remap; - map>> new_pg_remap_items; - set old_pg_remap, old_pg_remap_items; + map> new_pg_upmap; + map>> new_pg_upmap_items; + set old_pg_upmap, old_pg_upmap_items; string cluster_snapshot; @@ -237,8 +237,8 @@ class OSDMap { ceph::shared_ptr< vector<__u32> > osd_primary_affinity; ///< 16.16 fixed point, 0x10000 = baseline // remap (post-CRUSH, pre-up) - map> pg_remap; ///< remap pg - map>> pg_remap_items; ///< remap osds in up set + map> pg_upmap; ///< remap pg + map>> pg_upmap_items; ///< remap osds in up set map pools; map pool_name; @@ -663,7 +663,7 @@ class OSDMap { void _apply_primary_affinity(ps_t seed, const pg_pool_t& pool, vector *osds, int *primary) const; - /// apply pg_remap[_items] mappings + /// apply pg_upmap[_items] mappings void _apply_remap(const pg_pool_t& pi, pg_t pg, vector *raw) const; /// pg -> (up osd list) @@ -859,11 +859,11 @@ class OSDMap { return calc_pg_role(osd, group, nrep) >= 0; } - int clean_remaps( + int clean_pg_upmaps( CephContext *cct, Incremental *pending_inc); - bool try_pg_remap( + bool try_pg_upmap( CephContext *cct, pg_t pg, ///< pg to potentially remap const set& overfull, ///< osds we'd want to evacuate @@ -871,12 +871,12 @@ class OSDMap { vector *orig, vector *out); ///< resulting alternative mapping - int remap_pgs( + int calc_pg_upmaps( CephContext *cct, float max_deviation, ///< max deviation from target (value < 1.0) int max_iterations, ///< max iterations to run const set& pools, ///< [optional] restrict to pool - OSDMap::Incremental *pending_inc + Incremental *pending_inc ); /* diff --git a/src/test/cli/osdmaptool/help.t b/src/test/cli/osdmaptool/help.t index 22945468df856..69374a82dfa00 100644 --- a/src/test/cli/osdmaptool/help.t +++ b/src/test/cli/osdmaptool/help.t @@ -11,12 +11,12 @@ --test-random do random placements --test-map-pg map a pgid to osds --test-map-object [--pool ] map an object to osds - --remap-cleanup clean up pg_remap[_items] entries, writing + --upmap-cleanup clean up pg_upmap[_items] entries, writing commands to [default: - for stdout] - --remap calculate pg remap entries to balance pg layout + --upmap calculate pg upmap entries to balance pg layout writing commands to [default: - for stdout] - --remap-max set max remap entries to calculate [default: 100] - --remap-deviation + --upmap-max set max upmap entries to calculate [default: 100] + --upmap-deviation max deviation from target [default: .01] - --remap-pool restrict remap balancing to 1 or more pools + --upmap-pool restrict upmap balancing to 1 or more pools [1] diff --git a/src/test/cli/osdmaptool/missing-argument.t b/src/test/cli/osdmaptool/missing-argument.t index 5e59b67614f0f..9c7c65631279a 100644 --- a/src/test/cli/osdmaptool/missing-argument.t +++ b/src/test/cli/osdmaptool/missing-argument.t @@ -11,12 +11,12 @@ --test-random do random placements --test-map-pg map a pgid to osds --test-map-object [--pool ] map an object to osds - --remap-cleanup clean up pg_remap[_items] entries, writing + --upmap-cleanup clean up pg_upmap[_items] entries, writing commands to [default: - for stdout] - --remap calculate pg remap entries to balance pg layout + --upmap calculate pg upmap entries to balance pg layout writing commands to [default: - for stdout] - --remap-max set max remap entries to calculate [default: 100] - --remap-deviation + --upmap-max set max upmap entries to calculate [default: 100] + --upmap-deviation max deviation from target [default: .01] - --remap-pool restrict remap balancing to 1 or more pools + --upmap-pool restrict upmap balancing to 1 or more pools [1] diff --git a/src/test/cli/osdmaptool/remap.t b/src/test/cli/osdmaptool/remap.t deleted file mode 100644 index 32841bccdf00e..0000000000000 --- a/src/test/cli/osdmaptool/remap.t +++ /dev/null @@ -1,23 +0,0 @@ - $ osdmaptool --create-from-conf om -c $TESTDIR/ceph.conf.withracks - osdmaptool: osdmap file 'om' - osdmaptool: writing epoch 1 to om - $ osdmaptool om --mark-up-in --remap-max 11 --remap c - osdmaptool: osdmap file 'om' - marking all OSDs up and in - writing remap command output to: c - checking for remap cleanups - remap, max-count 11, max deviation 0.01 - osdmaptool: writing epoch 3 to om - $ cat c - ceph osd pg-remap-items 0.3 54 52 156 155 - ceph osd pg-remap-items 0.1b 158 155 231 227 143 142 - ceph osd pg-remap-items 0.22 168 163 54 52 136 135 - ceph osd pg-remap-items 0.2e 87 86 54 52 - ceph osd pg-remap-items 0.6f 69 65 54 52 157 155 - ceph osd pg-remap-items 0.12b 54 52 226 227 - ceph osd pg-remap-items 0.13f 54 52 96 95 43 46 - ceph osd pg-remap-items 0.151 36 42 54 52 - ceph osd pg-remap-items 0.185 60 61 54 52 - ceph osd pg-remap-items 0.1e3 54 52 - ceph osd pg-remap-items 0.272 54 52 - $ rm -f om c diff --git a/src/test/cli/osdmaptool/upmap.t b/src/test/cli/osdmaptool/upmap.t new file mode 100644 index 0000000000000..c833da3991ff8 --- /dev/null +++ b/src/test/cli/osdmaptool/upmap.t @@ -0,0 +1,23 @@ + $ osdmaptool --create-from-conf om -c $TESTDIR/ceph.conf.withracks + osdmaptool: osdmap file 'om' + osdmaptool: writing epoch 1 to om + $ osdmaptool om --mark-up-in --upmap-max 11 --upmap c + osdmaptool: osdmap file 'om' + marking all OSDs up and in + writing upmap command output to: c + checking for upmap cleanups + upmap, max-count 11, max deviation 0.01 + osdmaptool: writing epoch 3 to om + $ cat c + ceph osd pg-upmap-items 0.3 54 52 156 155 + ceph osd pg-upmap-items 0.1b 158 155 231 227 143 142 + ceph osd pg-upmap-items 0.22 168 163 54 52 136 135 + ceph osd pg-upmap-items 0.2e 87 86 54 52 + ceph osd pg-upmap-items 0.6f 69 65 54 52 157 155 + ceph osd pg-upmap-items 0.12b 54 52 226 227 + ceph osd pg-upmap-items 0.13f 54 52 96 95 43 46 + ceph osd pg-upmap-items 0.151 36 42 54 52 + ceph osd pg-upmap-items 0.185 60 61 54 52 + ceph osd pg-upmap-items 0.1e3 54 52 + ceph osd pg-upmap-items 0.272 54 52 + $ rm -f om c diff --git a/src/tools/osdmaptool.cc b/src/tools/osdmaptool.cc index db1480189d750..1301f4f542b61 100644 --- a/src/tools/osdmaptool.cc +++ b/src/tools/osdmaptool.cc @@ -38,35 +38,35 @@ void usage() cout << " --test-map-pg map a pgid to osds" << std::endl; cout << " --test-map-object [--pool ] map an object to osds" << std::endl; - cout << " --remap-cleanup clean up pg_remap[_items] entries, writing" << std::endl; + cout << " --upmap-cleanup clean up pg_upmap[_items] entries, writing" << std::endl; cout << " commands to [default: - for stdout]" << std::endl; - cout << " --remap calculate pg remap entries to balance pg layout" << std::endl; + cout << " --upmap calculate pg upmap entries to balance pg layout" << std::endl; cout << " writing commands to [default: - for stdout]" << std::endl; - cout << " --remap-max set max remap entries to calculate [default: 100]" << std::endl; - cout << " --remap-deviation " << std::endl; + cout << " --upmap-max set max upmap entries to calculate [default: 100]" << std::endl; + cout << " --upmap-deviation " << std::endl; cout << " max deviation from target [default: .01]" << std::endl; - cout << " --remap-pool restrict remap balancing to 1 or more pools" << std::endl; + cout << " --upmap-pool restrict upmap balancing to 1 or more pools" << std::endl; exit(1); } -void print_inc_remaps(const OSDMap::Incremental& pending_inc, int fd) +void print_inc_upmaps(const OSDMap::Incremental& pending_inc, int fd) { ostringstream ss; - for (auto& i : pending_inc.old_pg_remap) { - ss << "ceph osd rm-pg-remap " << i << std::endl; + for (auto& i : pending_inc.old_pg_upmap) { + ss << "ceph osd rm-pg-upmap " << i << std::endl; } - for (auto& i : pending_inc.new_pg_remap) { - ss << "ceph osd pg-remap " << i.first; + for (auto& i : pending_inc.new_pg_upmap) { + ss << "ceph osd pg-upmap " << i.first; for (auto osd : i.second) { ss << " " << osd; } ss << std::endl; } - for (auto& i : pending_inc.old_pg_remap_items) { - ss << "ceph osd rm-pg-remap-items " << i << std::endl; + for (auto& i : pending_inc.old_pg_upmap_items) { + ss << "ceph osd rm-pg-upmap-items " << i << std::endl; } - for (auto& i : pending_inc.new_pg_remap_items) { - ss << "ceph osd pg-remap-items " << i.first; + for (auto& i : pending_inc.new_pg_upmap_items) { + ss << "ceph osd pg-upmap-items " << i.first; for (auto p : i.second) { ss << " " << p.first << " " << p.second; } @@ -115,12 +115,12 @@ int main(int argc, const char **argv) bool test_map_pgs = false; bool test_map_pgs_dump = false; bool test_random = false; - bool remap_cleanup = false; - bool remap = false; - std::string remap_file = "-"; - int remap_max = 100; - float remap_deviation = .01; - std::set remap_pools; + bool upmap_cleanup = false; + bool upmap = false; + std::string upmap_file = "-"; + int upmap_max = 100; + float upmap_deviation = .01; + std::set upmap_pools; int64_t pg_num = -1; bool test_map_pgs_dump_all = false; @@ -143,15 +143,15 @@ int main(int argc, const char **argv) if (!val.empty() && val != "plain") { tree_formatter.reset(Formatter::create(val, "", "json")); } - } else if (ceph_argparse_witharg(args, i, &remap_file, "--remap-cleanup", (char*)NULL)) { - remap_cleanup = true; - } else if (ceph_argparse_witharg(args, i, &remap_file, "--remap", (char*)NULL)) { - remap_cleanup = true; - remap = true; - } else if (ceph_argparse_witharg(args, i, &remap_max, err, "--remap-max", (char*)NULL)) { - } else if (ceph_argparse_witharg(args, i, &remap_deviation, err, "--remap-deviation", (char*)NULL)) { - } else if (ceph_argparse_witharg(args, i, &val, "--remap-pool", (char*)NULL)) { - remap_pools.insert(val); + } else if (ceph_argparse_witharg(args, i, &upmap_file, "--upmap-cleanup", (char*)NULL)) { + upmap_cleanup = true; + } else if (ceph_argparse_witharg(args, i, &upmap_file, "--upmap", (char*)NULL)) { + upmap_cleanup = true; + upmap = true; + } else if (ceph_argparse_witharg(args, i, &upmap_max, err, "--upmap-max", (char*)NULL)) { + } else if (ceph_argparse_witharg(args, i, &upmap_deviation, err, "--upmap-deviation", (char*)NULL)) { + } else if (ceph_argparse_witharg(args, i, &val, "--upmap-pool", (char*)NULL)) { + upmap_pools.insert(val); } else if (ceph_argparse_witharg(args, i, &num_osd, err, "--createsimple", (char*)NULL)) { if (!err.str().empty()) { cerr << err.str() << std::endl; @@ -303,37 +303,37 @@ int main(int argc, const char **argv) cout << "clearing pg/primary temp" << std::endl; osdmap.clear_temp(); } - int remap_fd = STDOUT_FILENO; - if (remap || remap_cleanup) { - if (remap_file != "-") { - remap_fd = ::open(remap_file.c_str(), O_CREAT|O_WRONLY, 0644); - if (remap_fd < 0) { - cerr << "error opening " << remap_file << ": " << cpp_strerror(errno) + int upmap_fd = STDOUT_FILENO; + if (upmap || upmap_cleanup) { + if (upmap_file != "-") { + upmap_fd = ::open(upmap_file.c_str(), O_CREAT|O_WRONLY, 0644); + if (upmap_fd < 0) { + cerr << "error opening " << upmap_file << ": " << cpp_strerror(errno) << std::endl; exit(1); } - cout << "writing remap command output to: " << remap_file << std::endl; + cout << "writing upmap command output to: " << upmap_file << std::endl; } } - if (remap_cleanup) { - cout << "checking for remap cleanups" << std::endl; + if (upmap_cleanup) { + cout << "checking for upmap cleanups" << std::endl; OSDMap::Incremental pending_inc(osdmap.get_epoch()+1); pending_inc.fsid = osdmap.get_fsid(); - int r = osdmap.clean_remaps(g_ceph_context, &pending_inc); + int r = osdmap.clean_pg_upmaps(g_ceph_context, &pending_inc); if (r > 0) { - print_inc_remaps(pending_inc, remap_fd); + print_inc_upmaps(pending_inc, upmap_fd); r = osdmap.apply_incremental(pending_inc); assert(r == 0); } } - if (remap) { - cout << "remap, max-count " << remap_max - << ", max deviation " << remap_deviation + if (upmap) { + cout << "upmap, max-count " << upmap_max + << ", max deviation " << upmap_deviation << std::endl; OSDMap::Incremental pending_inc(osdmap.get_epoch()+1); pending_inc.fsid = osdmap.get_fsid(); set pools; - for (auto& s : remap_pools) { + for (auto& s : upmap_pools) { int64_t p = osdmap.lookup_pg_pool_name(s); if (p < 0) { cerr << " pool '" << s << "' does not exist" << std::endl; @@ -342,22 +342,23 @@ int main(int argc, const char **argv) pools.insert(p); } if (!pools.empty()) - cout << " limiting to pools " << remap_pools << " (" << pools << ")" + cout << " limiting to pools " << upmap_pools << " (" << pools << ")" << std::endl; - int changed = osdmap.remap_pgs(g_ceph_context, remap_deviation, - remap_max, pools, - &pending_inc); + int changed = osdmap.calc_pg_upmaps( + g_ceph_context, upmap_deviation, + upmap_max, pools, + &pending_inc); if (changed) { - print_inc_remaps(pending_inc, remap_fd); + print_inc_upmaps(pending_inc, upmap_fd); int r = osdmap.apply_incremental(pending_inc); assert(r == 0); modified = true; } else { - cout << "no remaps proposed" << std::endl; + cout << "no upmaps proposed" << std::endl; } } - if (remap_file != "-") { - ::close(remap_fd); + if (upmap_file != "-") { + ::close(upmap_fd); } if (!import_crush.empty()) { @@ -597,7 +598,7 @@ int main(int argc, const char **argv) export_crush.empty() && import_crush.empty() && test_map_pg.empty() && test_map_object.empty() && !test_map_pgs && !test_map_pgs_dump && !test_map_pgs_dump_all && - !remap && !remap_cleanup) { + !upmap && !upmap_cleanup) { cerr << me << ": no action specified?" << std::endl; usage(); } diff --git a/src/vstart.sh b/src/vstart.sh index 1b4b0518f9aa7..77ff9212661ca 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -473,7 +473,7 @@ $extra_conf [mon] mon pg warn min per osd = 3 mon osd allow primary affinity = true - mon osd allow pg remap = true + mon osd allow pg upmap = true mon reweight min pgs per osd = 4 mon osd prime pg temp = true crushtool = $CEPH_BIN/crushtool