]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: pass '-i' to docker|podman run for shell|enter
authorSage Weil <sage@newdream.net>
Mon, 5 Apr 2021 14:48:07 +0000 (09:48 -0500)
committerSage Weil <sage@newdream.net>
Sat, 10 Apr 2021 13:06:40 +0000 (08:06 -0500)
This allows us to pipe things to stdin.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 8091bfda762f76cacc9254d70f50eba8f80d4046)

src/cephadm/cephadm

index dd87120482d5a3102aa82a7b035bff803786ae16..e0383c609745f5d201c748c92c18ca88adcf971c 100755 (executable)
@@ -4307,7 +4307,7 @@ def command_shell(ctx):
     if not ctx.keyring and os.path.exists(SHELL_DEFAULT_KEYRING):
         ctx.keyring = SHELL_DEFAULT_KEYRING
 
-    container_args = []  # type: List[str]
+    container_args: List[str] = ['-i']
     mounts = get_container_mounts(ctx, ctx.fsid, daemon_type, daemon_id,
                                   no_config=True if ctx.config else False)
     binds = get_container_binds(ctx, ctx.fsid, daemon_type, daemon_id)
@@ -4330,7 +4330,7 @@ def command_shell(ctx):
     else:
         command = ['bash']
         container_args += [
-            '-it',
+            '-t',
             '-e', 'LANG=C',
             '-e', 'PS1=%s' % CUSTOM_PS1,
         ]
@@ -4369,13 +4369,13 @@ def command_enter(ctx):
     if not ctx.fsid:
         raise Error('must pass --fsid to specify cluster')
     (daemon_type, daemon_id) = ctx.name.split('.', 1)
-    container_args = []  # type: List[str]
+    container_args = ['-i']  # type: List[str]
     if ctx.command:
         command = ctx.command
     else:
         command = ['sh']
         container_args += [
-            '-it',
+            '-t',
             '-e', 'LANG=C',
             '-e', 'PS1=%s' % CUSTOM_PS1,
         ]