]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/DaemonServer: add overrides value to 'config show'
authorGu Zhongyan <guzhongyan@360.cn>
Wed, 28 Mar 2018 09:22:21 +0000 (17:22 +0800)
committerGu Zhongyan <guzhongyan@360.cn>
Wed, 28 Mar 2018 09:29:27 +0000 (17:29 +0800)
config options can be overrided. If this happens,
values from different sources will be different.
display all source override values in 'config show'
would be helpful.

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
src/mgr/DaemonServer.cc

index 0d5dac7a095a9760c82ab6da75f7ac3b7e6ca2b2..5df71507c56a9fce05c7e9b4f02a64a2a500f605 100644 (file)
@@ -1427,9 +1427,12 @@ bool DaemonServer::handle_command(MCommand *m)
              for (--j; j != i.second.rbegin(); --j) {
                if (j->second == i.second.rbegin()->second) {
                  ov.push_front(string("(") + ceph_conf_level_name(j->first) +
+                               string("[") + j->second + string("]") +
                                string(")"));
                } else {
-                 ov.push_front(ceph_conf_level_name(j->first));
+                  ov.push_front(ceph_conf_level_name(j->first) +
+                                string("[") + j->second + string("]"));
+
                }
              }
              tbl << ov;
@@ -1481,9 +1484,11 @@ bool DaemonServer::handle_command(MCommand *m)
                for (--k; k != j->second.rbegin(); --k) {
                  if (k->second == j->second.rbegin()->second) {
                    ov.push_front(string("(") + ceph_conf_level_name(k->first) +
+                                 string("[") + k->second + string("]") +
                                  string(")"));
                  } else {
-                   ov.push_front(ceph_conf_level_name(k->first));
+                    ov.push_front(ceph_conf_level_name(k->first) +
+                                  string("[") + k->second + string("]"));
                  }
                }
                tbl << ov;