mirror of
https://github.com/ceph/ceph
synced 2025-03-25 11:48:05 +00:00
mon: remove Formatter arg to QuorumService::get_health()
This is used to dump extra weirdness to the health detail structured output, but we are about to remove all of that in luminous. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
6068e1856d
commit
e170405fd8
@ -199,3 +199,7 @@
|
||||
a 'timechecks' section describing the time sync status. This
|
||||
information is now available via the 'ceph time-sync-status'
|
||||
command.
|
||||
|
||||
* Certain extra fields in the 'ceph health' structured output that
|
||||
used to appear if the mons were low on disk space (which duplicated
|
||||
the information in the normal health warning messages) are now gone.
|
||||
|
@ -57,8 +57,7 @@ public:
|
||||
* @{
|
||||
*/
|
||||
void init() override { }
|
||||
void get_health(Formatter *f,
|
||||
list<pair<health_status_t,string> >& summary,
|
||||
void get_health(list<pair<health_status_t,string> >& summary,
|
||||
list<pair<health_status_t,string> > *detail) override { }
|
||||
bool service_dispatch(MonOpRequestRef op) override;
|
||||
|
||||
|
@ -65,16 +65,10 @@ void DataHealthService::start_epoch()
|
||||
}
|
||||
|
||||
void DataHealthService::get_health(
|
||||
Formatter *f,
|
||||
list<pair<health_status_t,string> >& summary,
|
||||
list<pair<health_status_t,string> > *detail)
|
||||
{
|
||||
dout(10) << __func__ << dendl;
|
||||
if (f) {
|
||||
f->open_object_section("data_health");
|
||||
f->open_array_section("mons");
|
||||
}
|
||||
|
||||
for (map<entity_inst_t,DataStats>::iterator it = stats.begin();
|
||||
it != stats.end(); ++it) {
|
||||
string mon_name = mon->monmap->get_name(it->first.addr);
|
||||
@ -110,22 +104,6 @@ void DataHealthService::get_health(
|
||||
if (detail)
|
||||
detail->push_back(make_pair(health_status, ss.str()));
|
||||
}
|
||||
|
||||
if (f) {
|
||||
f->open_object_section("mon");
|
||||
f->dump_string("name", mon_name.c_str());
|
||||
// leave this unenclosed by an object section to avoid breaking backward-compatibility
|
||||
stats.dump(f);
|
||||
f->dump_stream("health") << health_status;
|
||||
if (health_status != HEALTH_OK)
|
||||
f->dump_string("health_detail", health_detail);
|
||||
f->close_section();
|
||||
}
|
||||
}
|
||||
|
||||
if (f) {
|
||||
f->close_section(); // mons
|
||||
f->close_section(); // data_health
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,9 +65,9 @@ public:
|
||||
start_tick();
|
||||
}
|
||||
|
||||
void get_health(Formatter *f,
|
||||
list<pair<health_status_t,string> >& summary,
|
||||
list<pair<health_status_t,string> > *detail) override;
|
||||
void get_health(
|
||||
list<pair<health_status_t,string> >& summary,
|
||||
list<pair<health_status_t,string> > *detail) override;
|
||||
|
||||
int get_type() override {
|
||||
return HealthService::SERVICE_HEALTH_DATA;
|
||||
|
@ -95,24 +95,14 @@ void HealthMonitor::service_shutdown()
|
||||
services.clear();
|
||||
}
|
||||
|
||||
void HealthMonitor::get_health(Formatter *f,
|
||||
list<pair<health_status_t,string> >& summary,
|
||||
list<pair<health_status_t,string> > *detail)
|
||||
void HealthMonitor::get_health(
|
||||
list<pair<health_status_t,string> >& summary,
|
||||
list<pair<health_status_t,string> > *detail)
|
||||
{
|
||||
if (f) {
|
||||
f->open_object_section("health");
|
||||
f->open_array_section("health_services");
|
||||
}
|
||||
|
||||
for (map<int,HealthService*>::iterator it = services.begin();
|
||||
it != services.end();
|
||||
++it) {
|
||||
it->second->get_health(f, summary, detail);
|
||||
}
|
||||
|
||||
if (f) {
|
||||
f->close_section(); // health_services
|
||||
f->close_section(); // health
|
||||
it->second->get_health(summary, detail);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,8 +39,7 @@ public:
|
||||
* @{
|
||||
*/
|
||||
void init() override;
|
||||
void get_health(Formatter *f,
|
||||
list<pair<health_status_t,string> >& summary,
|
||||
void get_health(list<pair<health_status_t,string> >& summary,
|
||||
list<pair<health_status_t,string> > *detail) override;
|
||||
bool service_dispatch(MonOpRequestRef op) override;
|
||||
|
||||
|
@ -2462,7 +2462,7 @@ health_status_t Monitor::get_health(list<string>& status,
|
||||
s->get_health(summary, detailbl ? &detail : NULL, cct);
|
||||
}
|
||||
|
||||
health_monitor->get_health(f, summary, (detailbl ? &detail : NULL));
|
||||
health_monitor->get_health(summary, (detailbl ? &detail : NULL));
|
||||
|
||||
health_status_t overall = HEALTH_OK;
|
||||
if (!timecheck_skews.empty()) {
|
||||
|
@ -117,8 +117,7 @@ public:
|
||||
|
||||
virtual void init() { }
|
||||
|
||||
virtual void get_health(Formatter *f,
|
||||
list<pair<health_status_t,string> >& summary,
|
||||
virtual void get_health(list<pair<health_status_t,string> >& summary,
|
||||
list<pair<health_status_t,string> > *detail) = 0;
|
||||
virtual int get_type() = 0;
|
||||
virtual string get_name() const = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user