From: John Spray Date: Mon, 26 Jun 2017 23:10:24 +0000 (-0400) Subject: librados: include common daemon metadata in service_daemon_register X-Git-Tag: v12.1.1~98^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=46059900d3b77ee6a5e7895fb58ee5f520679aed;p=ceph-ci.git librados: include common daemon metadata in service_daemon_register 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 --- diff --git a/src/librados/RadosClient.cc b/src/librados/RadosClient.cc index b142267f588..c90f3c129d4 100644 --- a/src/librados/RadosClient.cc +++ b/src/librados/RadosClient.cc @@ -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; diff --git a/src/test/librados/CMakeLists.txt b/src/test/librados/CMakeLists.txt index bfae1d641d7..c35ddb3d8fb 100644 --- a/src/test/librados/CMakeLists.txt +++ b/src/test/librados/CMakeLists.txt @@ -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