summaryrefslogtreecommitdiffstats
path: root/src/mds/Beacon.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-21 02:27:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-21 02:27:49 +0000
commit7a34f7a30b4a4e8efeac9ba420466271ccbd41ef (patch)
tree9dd853fa51de7b429a5e7aa64a2f640d30506378 /src/mds/Beacon.cc
parentReleasing progress-linux version 18.2.3-0progress7.99u1. (diff)
downloadceph-7a34f7a30b4a4e8efeac9ba420466271ccbd41ef.tar.xz
ceph-7a34f7a30b4a4e8efeac9ba420466271ccbd41ef.zip
Merging upstream version 18.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/mds/Beacon.cc')
-rw-r--r--src/mds/Beacon.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mds/Beacon.cc b/src/mds/Beacon.cc
index 5dd319a14..b67e0a31b 100644
--- a/src/mds/Beacon.cc
+++ b/src/mds/Beacon.cc
@@ -484,6 +484,30 @@ void Beacon::notify_health(MDSRank const *mds)
health.metrics.push_back(m);
}
+ // Report a health warning if clients have broken root_squash
+ if (auto c = mds->sessionmap.num_broken_root_squash_clients(); c > 0) {
+ std::vector<MDSHealthMetric> metrics;
+
+ for (auto&& session : mds->sessionmap.get_broken_root_squash_clients()) {
+ CachedStackStringStream css;
+ *css << "Client " << session->get_human_name() << " has broken root_squash implementation";
+ MDSHealthMetric m(MDS_HEALTH_CLIENTS_BROKEN_ROOTSQUASH, HEALTH_ERR, css->strv());
+ m.metadata["client_id"] = stringify(session->get_client());
+ metrics.emplace_back(std::move(m));
+ }
+
+ if (metrics.size() <= (size_t)g_conf()->mds_health_summarize_threshold) {
+ health.metrics.insert(std::end(health.metrics), std::make_move_iterator(std::begin(metrics)), std::make_move_iterator(std::end(metrics)));
+ } else {
+ CachedStackStringStream css;
+ *css << "There are " << c << " clients with broken root_squash implementations";
+ dout(20) << css->strv() << dendl;
+ MDSHealthMetric m(MDS_HEALTH_CLIENTS_BROKEN_ROOTSQUASH, HEALTH_ERR, css->strv());
+ m.metadata["client_count"] = stringify(c);
+ health.metrics.push_back(std::move(m));
+ }
+ }
+
// Report if we have significantly exceeded our cache size limit
if (mds->mdcache->cache_overfull()) {
CachedStackStringStream css;