]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: block future use of extra_args
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 16 May 2023 17:49:28 +0000 (13:49 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 15 Jun 2023 20:35:34 +0000 (16:35 -0400)
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 <jmulligan@redhat.com>
src/pybind/mgr/cephadm/services/cephadmservice.py

index 5ab8810db0edf0a7a474b73ef1215592fd8a07c7..ef5b8bd69366099aa71567ac2db3589cc2a73d6d 100644 (file)
@@ -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):
     """