mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
Merge PR #40597 into master
* refs/pull/40597/head: cephadm: pass '-i' to docker|podman run for shell|enter Reviewed-by: Adam King <adking@redhat.com>
This commit is contained in:
commit
2218c9473f
@ -4335,7 +4335,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)
|
||||
@ -4358,7 +4358,7 @@ def command_shell(ctx):
|
||||
else:
|
||||
command = ['bash']
|
||||
container_args += [
|
||||
'-it',
|
||||
'-t',
|
||||
'-e', 'LANG=C',
|
||||
'-e', 'PS1=%s' % CUSTOM_PS1,
|
||||
]
|
||||
@ -4397,13 +4397,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,
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user