]> git.apps.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)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2021 12:56:18 +0000 (07:56 -0500)
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>
(cherry picked from commit 2142dcfc2bac3159b7a24f92ae75df2a14599377)

src/cephadm/cephadm

index d275cde14f10e5c812b30fb42fcf5e6722604c55..7ced316fe6fdbe6db84a5777070b97784ba4b62d 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