From 46059900d3b77ee6a5e7895fb58ee5f520679aed Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 26 Jun 2017 19:10:24 -0400 Subject: [PATCH] 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 --- src/librados/RadosClient.cc | 3 +++ src/test/librados/CMakeLists.txt | 1 + 2 files changed, 4 insertions(+) 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 -- 2.39.5