From: Xiubo Li Date: Mon, 14 Mar 2022 06:29:34 +0000 (+0800) Subject: client: add option to enable and force collecting and sending metrics X-Git-Tag: v16.2.11~475^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e4cbdc3b3cd100143e05f0f3a408b7ab28d74a1;p=ceph.git client: add option to enable and force collecting and sending metrics To be careful to enable this because it may crash the old MDSes while upgrading. Fixes: https://tracker.ceph.com/issues/54411 Signed-off-by: Xiubo Li (cherry picked from commit beb9f1648101bd18f3619c9fc7e972fab34dfc85) Conflicts: src/common/options/mds-client.yaml.in --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 680421da982..32f2fd1cf5c 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -346,6 +346,9 @@ Client::Client(Messenger *m, MonClient *mc, Objecter *objecter_) fuse_default_permissions = cct->_conf.get_val( "fuse_default_permissions"); + _collect_and_send_global_metrics = cct->_conf.get_val( + "client_collect_and_send_global_metrics"); + if (cct->_conf->client_acl_type == "posix_acl") acl_type = POSIX_ACL; @@ -15734,6 +15737,10 @@ void Client::handle_conf_change(const ConfigProxy& conf, if (changed.count("client_oc_max_dirty_age")) { objectcacher->set_max_dirty_age(cct->_conf->client_oc_max_dirty_age); } + if (changed.count("client_collect_and_send_global_metrics")) { + _collect_and_send_global_metrics = cct->_conf.get_val( + "client_collect_and_send_global_metrics"); + } } void intrusive_ptr_add_ref(Inode *in) diff --git a/src/client/Client.h b/src/client/Client.h index 43263a1cdfa..304c20b90ed 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -889,6 +889,7 @@ public: std::unique_ptr mdsmap; bool fuse_default_permissions; + bool _collect_and_send_global_metrics; protected: /* Flags for check_caps() */ diff --git a/src/common/options.cc b/src/common/options.cc index 06d300b5c2b..528d1a28f61 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -9211,6 +9211,14 @@ std::vector