]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
service_spec: force ceph-exporter sock_dir to be unest or "/var/run/ceph/"
authorAdam King <adking@redhat.com>
Mon, 13 Jan 2025 18:25:00 +0000 (13:25 -0500)
committerAdam King <adking@redhat.com>
Mon, 13 Jan 2025 18:28:05 +0000 (13:28 -0500)
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 <adking@redhat.com>
src/python-common/ceph/deployment/service_spec.py

index f8a0e41baf26f7fd9fdfd89c50d24051b703dcf5..161e0dabb7379dacc0652d243b5a93847c46f551 100644 (file)
@@ -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)}')