Skip to content

Commit 4fccf58

Browse files
committed
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 <[email protected]>
1 parent 3b28df8 commit 4fccf58

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/python-common/ceph/deployment/service_spec.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2868,7 +2868,7 @@ def __init__(self,
28682868
extra_entrypoint_args=extra_entrypoint_args)
28692869

28702870
self.service_type = service_type
2871-
self.sock_dir = sock_dir
2871+
self.sock_dir = None
28722872
self.addrs = addrs
28732873
self.port = port
28742874
self.prio_limit = prio_limit
@@ -2880,6 +2880,11 @@ def get_port_start(self) -> List[int]:
28802880
def validate(self) -> None:
28812881
super(CephExporterSpec, self).validate()
28822882

2883+
if self.sock_dir and self.sock_dir != '/var/run/ceph/':
2884+
raise SpecValidationError(
2885+
'sock_dir setting is deprecated and must be either unset or set to /var/run/ceph/'
2886+
)
2887+
28832888
if not isinstance(self.prio_limit, int):
28842889
raise SpecValidationError(
28852890
f'prio_limit must be an integer. Got {type(self.prio_limit)}')

0 commit comments

Comments
 (0)