]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: Get rid of injected_argv
authorSebastian Wagner <sebastian.wagner@suse.com>
Mon, 22 Feb 2021 14:12:39 +0000 (15:12 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Thu, 4 Mar 2021 17:27:20 +0000 (18:27 +0100)
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 <jolmomar@redhat.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/cephadm/cephadm

index 5d6a1da4c85d0cba736c1b5d3e1e3b4fb4fa2610..5f9443645ef2966fc4649c6ddf12fd5fc6d2c52d 100755 (executable)
@@ -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