From 4fccf58b4b1115e3ca092afac4905f7de85fde5e Mon Sep 17 00:00:00 2001 From: Adam King Date: Mon, 13 Jan 2025 13:25:00 -0500 Subject: [PATCH] service_spec: force ceph-exporter sock_dir to be unest or "/var/run/ceph/" As discussed in https://tracker.ceph.com/issues/69475 this setting is effectively useless as it only controls the directory inside the container where the ceph-exporter will write out its asok file, and has no influence over where it is on the host where the ceph-exporter daemon is deployed. Given any custom values for the sock_dir setting would have always been broken, we decided to skip out on writing a proper migration step in cephadm to deal with this, and instead just force this field to be unset Signed-off-by: Adam King --- src/python-common/ceph/deployment/service_spec.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index f8a0e41baf2..161e0dabb73 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -2868,7 +2868,7 @@ class CephExporterSpec(ServiceSpec): extra_entrypoint_args=extra_entrypoint_args) self.service_type = service_type - self.sock_dir = sock_dir + self.sock_dir = None self.addrs = addrs self.port = port self.prio_limit = prio_limit @@ -2880,6 +2880,11 @@ class CephExporterSpec(ServiceSpec): def validate(self) -> None: super(CephExporterSpec, self).validate() + if self.sock_dir and self.sock_dir != '/var/run/ceph/': + raise SpecValidationError( + 'sock_dir setting is deprecated and must be either unset or set to /var/run/ceph/' + ) + if not isinstance(self.prio_limit, int): raise SpecValidationError( f'prio_limit must be an integer. Got {type(self.prio_limit)}') -- 2.39.5