From d69e57bc4b820a6c6fe1da9f3d54f95a21dad026 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Mon, 22 Feb 2021 15:12:39 +0100 Subject: [PATCH] cephadm: Get rid of injected_argv MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 2142dcfc2bac3159b7a24f92ae75df2a14599377) --- src/cephadm/cephadm | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index d275cde14f10e..7ced316fe6fdb 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 -- 2.39.5