I think this was previously only working as a side effect
of other MDS map changes.
Signed-off-by: John Spray <john.spray@redhat.com>
DECODE_FINISH(bl);
}
+ bool operator==(MDSHealthMetric const &other) const
+ {
+ return (type == other.type && sev == other.sev && message == other.message);
+ }
+
MDSHealthMetric() : type(MDS_HEALTH_NULL), sev(HEALTH_OK) {}
MDSHealthMetric(mds_metric_t type_, health_status_t sev_, std::string const &message_)
: type(type_), sev(sev_), message(message_) {}
::decode(metrics, bl);
DECODE_FINISH(bl);
}
+
+ bool operator==(MDSHealth const &other) const
+ {
+ return metrics == other.metrics;
+ }
};
WRITE_CLASS_ENCODER(MDSHealth)
return false; // need to update map
}
+ // Comparing known daemon health with m->get_health()
+ // and return false (i.e. require proposal) if they
+ // do not match, to update our stored
+ if (!(pending_daemon_health[gid] == m->get_health())) {
+ dout(20) << __func__ << " health metrics for gid " << gid << " were updated" << dendl;
+ return false;
+ }
+
ignore:
// note time and reply
_note_beacon(m);