]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/DaemonServer: add IGNORES column to 'config show'
authorSage Weil <sage@redhat.com>
Wed, 10 Jan 2018 23:34:44 +0000 (17:34 -0600)
committerSage Weil <sage@redhat.com>
Tue, 6 Mar 2018 20:44:49 +0000 (14:44 -0600)
If the daemon is ignoring a mon config, show that.  Note that this
column only ever says 'mon', which might be confusing to users.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/DaemonServer.cc

index 71aed90f22b9ac4680a69d4989ebf0e0b2c6ad17..7715a48098f534df51c608f75a4404b76945829b 100644 (file)
@@ -1387,6 +1387,7 @@ bool DaemonServer::handle_command(MCommand *m)
        tbl.define_column("VALUE", TextTable::LEFT, TextTable::LEFT);
        tbl.define_column("SOURCE", TextTable::LEFT, TextTable::LEFT);
        tbl.define_column("OVERRIDES", TextTable::LEFT, TextTable::LEFT);
+       tbl.define_column("IGNORES", TextTable::LEFT, TextTable::LEFT);
       }
       if (prefix == "config show") {
        // show
@@ -1412,6 +1413,9 @@ bool DaemonServer::handle_command(MCommand *m)
              }
              f->close_section();
            }
+           if (daemon->ignored_mon_config.count(i.first)) {
+             f->dump_string("ignores", "mon");
+           }
            f->close_section();
          } else {
            tbl << i.first;
@@ -1429,7 +1433,10 @@ bool DaemonServer::handle_command(MCommand *m)
                }
              }
              tbl << ov;
+           } else {
+             tbl << "";
            }
+           tbl << (daemon->ignored_mon_config.count(i.first) ? "mon" : "");
            tbl << TextTable::endrow;
          }
        }
@@ -1461,6 +1468,9 @@ bool DaemonServer::handle_command(MCommand *m)
                }
                f->close_section();
              }
+             if (daemon->ignored_mon_config.count(i.first)) {
+               f->dump_string("ignores", "mon");
+             }
              f->close_section();
            } else {
              tbl << j->second.rbegin()->second;
@@ -1477,7 +1487,10 @@ bool DaemonServer::handle_command(MCommand *m)
                  }
                }
                tbl << ov;
+             } else {
+               tbl << "";
              }
+             tbl << (daemon->ignored_mon_config.count(i.first) ? "mon" : "");
              tbl << TextTable::endrow;
            }
          } else {
@@ -1490,6 +1503,7 @@ bool DaemonServer::handle_command(MCommand *m)
              tbl << i.second;
              tbl << ceph_conf_level_name(CONF_DEFAULT);
              tbl << "";
+             tbl << "";
              tbl << TextTable::endrow;
            }
          }