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)
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] == '}':
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