]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/mon/mds: fix `config set` tell command 16700/head
authorJohn Spray <john.spray@redhat.com>
Mon, 31 Jul 2017 09:52:08 +0000 (05:52 -0400)
committerJohn Spray <john.spray@redhat.com>
Mon, 31 Jul 2017 13:28:21 +0000 (09:28 -0400)
This was working for setting values, but failing to call
the config observers, so some values didn't take effect.

Fixes: http://tracker.ceph.com/issues/20803
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSDaemon.cc
src/mon/Monitor.cc
src/osd/OSD.cc

index 2bbe759ed3e7db9e95b832f233407643f1b75513..883a4c3b9c68bda61d041dc1ed8c2273b2dbdedf 100644 (file)
@@ -781,6 +781,9 @@ int MDSDaemon::_handle_command(
     std::string val;
     cmd_getval(cct, cmdmap, "value", val);
     r = cct->_conf->set_val(key, val, true, &ss);
+    if (r == 0) {
+      cct->_conf->apply_changes(nullptr);
+    }
   } else if (prefix == "exit") {
     // We will send response before executing
     ss << "Exiting...";
index def5571c3d134275a6a8fb0be2810cbb807921a4..692c170b65574559bc0bf0a397462b71dac83178 100644 (file)
@@ -3269,6 +3269,9 @@ void Monitor::handle_command(MonOpRequestRef op)
     std::string val;
     cmd_getval(cct, cmdmap, "value", val);
     r = g_conf->set_val(key, val, true, &ss);
+    if (r == 0) {
+      g_conf->apply_changes(nullptr);
+    }
     rs = ss.str();
     goto out;
   } else if (prefix == "status" ||
index 79f29db4b998e5e4d5ff2d7d1ac7f842813cc818..a21cb65cf460c4ba8b7d81fab3e71cc23acc5238 100644 (file)
@@ -6402,6 +6402,9 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
     cmd_getval(cct, cmdmap, "value", val);
     osd_lock.Unlock();
     r = cct->_conf->set_val(key, val, true, &ss);
+    if (r == 0) {
+      cct->_conf->apply_changes(nullptr);
+    }
     osd_lock.Lock();
   }
   else if (prefix == "cluster_log") {