From: Sebastian Wagner Date: Mon, 22 Feb 2021 14:12:39 +0000 (+0100) Subject: cephadm: Get rid of injected_argv X-Git-Tag: v17.1.0~2665^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2142dcfc2bac3159b7a24f92ae75df2a14599377;p=ceph.git cephadm: Get rid of injected_argv Removed the injected_argv parameter and the injection of code in the cephadm script we send to hosts. Now the script is copied and after that we execute the cephadm command. I would like to copy it only one time (when adding new hosts) but this will be part of a future PR, together with other prs to: - Introduce cephadm version - Get rid of packaged/root mode - Use pex or eggs Signed-off-by: Juan Miguel Olmo Martínez Signed-off-by: Sebastian Wagner --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 5d6a1da4c85d0..5f9443645ef29 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2185,11 +2185,8 @@ def get_parm(option): if cached_stdin is not None: j = cached_stdin else: - try: - j = injected_stdin # type: ignore - except NameError: - j = sys.stdin.read() - cached_stdin = j + j = sys.stdin.read() + cached_stdin = j else: # inline json string if option[0] == '{' and option[-1] == '}': @@ -7838,10 +7835,7 @@ def main(): sys.exit(1) av: List[str] = [] - try: - av = injected_argv # type: ignore - except NameError: - av = sys.argv[1:] + av = sys.argv[1:] ctx = cephadm_init(av) if not ctx: # error, exit