From 1a331234e80c4bf65f754203933d833a1df67743 Mon Sep 17 00:00:00 2001 From: John Spray Date: Sun, 15 May 2016 12:02:40 +0100 Subject: [PATCH] common: move ceph_version up into collect_sys_info ...so that we get this piece of metadata from every service uniformly. Signed-off-by: John Spray --- src/common/util.cc | 4 ++++ src/osd/OSD.cc | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/util.cc b/src/common/util.cc index 124b9b9c39e07..f330e42fa7faf 100644 --- a/src/common/util.cc +++ b/src/common/util.cc @@ -20,6 +20,7 @@ #include "common/debug.h" #include "common/errno.h" #include "common/strtol.h" +#include "common/version.h" #ifdef HAVE_SYS_VFS_H #include @@ -213,6 +214,9 @@ static void distro_detect(map *m, CephContext *cct) void collect_sys_info(map *m, CephContext *cct) { + // version + (*m)["ceph_version"] = pretty_version_to_str(); + // kernel info struct utsname u; int r = uname(&u); diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index bc18041bf69e1..9e00c34ca5722 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4976,8 +4976,6 @@ void OSD::_send_boot() void OSD::_collect_metadata(map *pm) { - (*pm)["ceph_version"] = pretty_version_to_str(); - // config info (*pm)["osd_data"] = dev_path; (*pm)["osd_journal"] = journal_path; -- 2.39.5