]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
common: move ceph_version up into collect_sys_info
authorJohn Spray <john.spray@redhat.com>
Sun, 15 May 2016 11:02:40 +0000 (12:02 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 29 Sep 2016 16:26:51 +0000 (17:26 +0100)
...so that we get this piece of metadata from every
service uniformly.

Signed-off-by: John Spray <john.spray@redhat.com>
src/common/util.cc
src/osd/OSD.cc

index 124b9b9c39e073a8c97ab510c3bdfa7b356a645d..f330e42fa7faf773adb680b08eee03c2c18946c1 100644 (file)
@@ -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 <sys/vfs.h>
@@ -213,6 +214,9 @@ static void distro_detect(map<string, string> *m, CephContext *cct)
 
 void collect_sys_info(map<string, string> *m, CephContext *cct)
 {
+  // version
+  (*m)["ceph_version"] = pretty_version_to_str();
+
   // kernel info
   struct utsname u;
   int r = uname(&u);
index bc18041bf69e1addd346b8c31d6375b1fba47b59..9e00c34ca57226db54a96e04cb02195a61e19817 100644 (file)
@@ -4976,8 +4976,6 @@ void OSD::_send_boot()
 
 void OSD::_collect_metadata(map<string,string> *pm)
 {
-  (*pm)["ceph_version"] = pretty_version_to_str();
-
   // config info
   (*pm)["osd_data"] = dev_path;
   (*pm)["osd_journal"] = journal_path;