From 8caab3db7500321c09dd625319e4454f59e7fec2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 2 May 2021 18:08:33 -0400 Subject: [PATCH] cephadm: add -v arg to shell Signed-off-by: Sage Weil (cherry picked from commit 693fd30532760067a262f381fb3487deae52f689) --- src/cephadm/cephadm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index aac7331515b0..808453947339 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -4504,6 +4504,10 @@ def command_shell(ctx): os.path.join(home, f)) mounts[home] = '/root' + for i in ctx.volume: + a, b = i.split(':', 1) + mounts[a] = b + c = CephContainer( ctx, image=ctx.image, @@ -7678,6 +7682,11 @@ def _get_parser(): action='append', default=[], help='set environment variable') + parser_shell.add_argument( + '--volume', '-v', + action='append', + default=[], + help='set environment variable') parser_shell.add_argument( 'command', nargs=argparse.REMAINDER, help='command (optional)') -- 2.47.3