From: Brad Hubbard Date: Thu, 2 Aug 2018 00:33:42 +0000 (+1000) Subject: luminous: mgr/MgrClient: Protect daemon_health_metrics X-Git-Tag: v12.2.8~23^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=604cf6bc040b34d16101f6e806c18fb6ea8572a1;p=ceph.git luminous: mgr/MgrClient: Protect daemon_health_metrics Without holding the lock update_daemon_health() can race with send_report() corrupting the daemon_health_metrics vector. Fixes: http://tracker.ceph.com/issues/23352 Signed-off-by: Kjetil Joergensen Signed-off-by: Brad Hubbard (cherry picked from commit 4996506a6b4ab309110039ea29a075f14d09a379) Conflicts: src/mgr/MgrClient.cc Function name is different in luminous --- diff --git a/src/mgr/MgrClient.cc b/src/mgr/MgrClient.cc index 5614e00d3a06..e2e3009a1875 100644 --- a/src/mgr/MgrClient.cc +++ b/src/mgr/MgrClient.cc @@ -465,5 +465,6 @@ int MgrClient::service_daemon_update_status( void MgrClient::update_osd_health(std::vector&& metrics) { + Mutex::Locker l(lock); osd_health_metrics = std::move(metrics); }