Skip to content

Commit f106724

Browse files
committed
Merge PR ceph#51850 into main
* refs/pull/51850/head: client: do not send metrics until the MDS rank is ready Reviewed-by: Venky Shankar <[email protected]> Reviewed-by: Dhairya Parmar <[email protected]>
2 parents 6d3dc77 + a423e17 commit f106724

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/client/Client.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6970,6 +6970,13 @@ void Client::collect_and_send_global_metrics() {
69706970
ldout(cct, 20) << __func__ << dendl;
69716971
ceph_assert(ceph_mutex_is_locked_by_me(client_lock));
69726972

6973+
/* Do not send the metrics until the MDS rank is ready */
6974+
if (!mdsmap->is_active((mds_rank_t)0)) {
6975+
ldout(cct, 5) << __func__ << " MDS rank 0 is not ready yet -- not sending metric"
6976+
<< dendl;
6977+
return;
6978+
}
6979+
69736980
if (!have_open_session((mds_rank_t)0)) {
69746981
ldout(cct, 5) << __func__ << ": no session with rank=0 -- not sending metric"
69756982
<< dendl;

0 commit comments

Comments
 (0)