From: John Mulligan Date: Tue, 16 May 2023 17:49:28 +0000 (-0400) Subject: mgr/cephadm: block future use of extra_args X-Git-Tag: v19.0.0~982^2~12 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b64807f759b1b619f5c568102cf58c5bafa87d76;p=ceph.git mgr/cephadm: block future use of extra_args Convert `extra_args` into a read-only property so that current code continues to work but anything that tries to set any `extra_args` now or in the future will be intentionally broken. This is mainly to find issues when running unit and teuthology tests. This patch could be dropped before the final merge if desired. Signed-off-by: John Mulligan --- diff --git a/src/pybind/mgr/cephadm/services/cephadmservice.py b/src/pybind/mgr/cephadm/services/cephadmservice.py index 5ab8810db0edf..ef5b8bd693660 100644 --- a/src/pybind/mgr/cephadm/services/cephadmservice.py +++ b/src/pybind/mgr/cephadm/services/cephadmservice.py @@ -80,8 +80,10 @@ class CephadmDaemonDeploySpec: # for run_cephadm. self.keyring: Optional[str] = keyring + # FIXME: finish removing this # For run_cephadm. Would be great to have more expressive names. - self.extra_args: List[str] = extra_args or [] + # self.extra_args: List[str] = extra_args or [] + assert not extra_args self.ceph_conf = ceph_conf self.extra_files = extra_files or {} @@ -148,6 +150,10 @@ class CephadmDaemonDeploySpec: extra_entrypoint_args=self.extra_entrypoint_args, ) + @property + def extra_args(self) -> List[str]: + return [] + class CephadmService(metaclass=ABCMeta): """