]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common: Allow PerfCounters to return a provided service ID
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 5 Sep 2025 15:31:40 +0000 (11:31 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 5 Sep 2025 15:36:21 +0000 (11:36 -0400)
commit6dc322421f7a3758251fe29e3f35934231358011
tree588a38b5df6f20152f53968441d10b1d4c699ca7
parentbbda58ec8635c7786272a29b96b8e2afe5a55552
common: Allow PerfCounters to return a provided service ID

Dashboard has asked for a unique identifier that can be associated
with services. This commit provides a component of that
functionality. Enforcing uniqueness is beyond the scope of this PR and
is the responsibility of cluster setup and orchestration. The scope of
uniqueness is a matter of policy and up to the design of cluster setup
and orchestration software.

We provide the `--service_unique_id` argument that can be passed on
the command line when executing a Ceph service that uses
`global_init`. If non-empty, a `service_unique_id` section is added to
the PerfCounters dump for that service. This section has a single
entry whose name is set to the argument of `service_unique_id` and
whose value is arbitrary. If unspecified or empty, no
`service_unique_id` section is added.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/common/ceph_context.cc
src/common/ceph_context.h
src/common/config.cc
src/common/options/global.yaml.in