]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: = is not a delimiter in --crush-location 1030/head
authorLoic Dachary <loic@dachary.org>
Wed, 1 Jan 2014 13:57:52 +0000 (14:57 +0100)
committerLoic Dachary <loic@dachary.org>
Wed, 1 Jan 2014 14:32:35 +0000 (15:32 +0100)
When parsing the crush location

     --crush-location 'root=default host=hostA'

it must create the vector

     [ 'root=default', 'host=hostA' ]

but the default list of separators of get_str_vec includes = which will
create

     [ 'root', 'default', 'host', 'hostA' ]

instead. Set the list of delimiters to exclude = instead.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/osdc/Objecter.cc

index 25e60b5911e307c68410aae3cd8398132ab7e447..3da9be9c1c032dac1fcd5822344dc994c64840c7 100644 (file)
@@ -147,7 +147,7 @@ void Objecter::handle_conf_change(const struct md_config_t *conf,
   if (changed.count("crush_location")) {
     crush_location.clear();
     vector<string> lvec;
-    get_str_vec(cct->_conf->crush_location, lvec);
+    get_str_vec(cct->_conf->crush_location, ";, \t", lvec);
     int r = CrushWrapper::parse_loc_multimap(lvec, &crush_location);
     if (r < 0) {
       lderr(cct) << "warning: crush_location '" << cct->_conf->crush_location