From b64807f759b1b619f5c568102cf58c5bafa87d76 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 16 May 2023 13:49:28 -0400 Subject: [PATCH] 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 --- src/pybind/mgr/cephadm/services/cephadmservice.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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): """ -- 2.39.5