]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
librados: include common daemon metadata in service_daemon_register
authorJohn Spray <john.spray@redhat.com>
Mon, 26 Jun 2017 23:10:24 +0000 (19:10 -0400)
committerSage Weil <sage@redhat.com>
Sun, 9 Jul 2017 18:09:05 +0000 (14:09 -0400)
Aside from being generally useful, this uniformity enables ceph-mgr
to have some common information about all the hosts
it knows about; otherwise we would sometimes learn
about a host without e.g. knowing about the cpu/ram/kernel.

Signed-off-by: John Spray <john.spray@redhat.com>
src/librados/RadosClient.cc
src/test/librados/CMakeLists.txt

index b142267f588cdce2f47afc927d83a8fed4f6d1ce..c90f3c129d454805d524d47b02bcef0b9bedfee6 100644 (file)
@@ -28,6 +28,7 @@
 #include "common/errno.h"
 #include "include/buffer.h"
 #include "include/stringify.h"
+#include "include/util.h"
 
 #include "messages/MLog.h"
 #include "msg/Messenger.h"
@@ -1041,6 +1042,8 @@ int librados::RadosClient::service_daemon_register(
     return -EINVAL;
   }
 
+  collect_sys_info(&daemon_metadata, cct);
+
   ldout(cct,10) << __func__ << " " << service << "." << name << dendl;
   service_daemon = true;
   service_name = service;
index bfae1d641d77c25f48221c5aac8b97e7937fff81..c35ddb3d8fb271fbf2e99c108f45b8dad16417a3 100644 (file)
@@ -158,6 +158,7 @@ install(TARGETS
   ceph_test_rados_api_lock
   ceph_test_rados_api_misc
   ceph_test_rados_api_pool
+  ceph_test_rados_api_service
   ceph_test_rados_api_snapshots
   ceph_test_rados_api_stat
   ceph_test_rados_api_tier