]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: add -v arg to shell
authorSage Weil <sage@newdream.net>
Sun, 2 May 2021 22:08:33 +0000 (18:08 -0400)
committerSage Weil <sage@newdream.net>
Wed, 19 May 2021 12:43:14 +0000 (08:43 -0400)
Signed-off-by: Sage Weil <sage@newdream.net>
src/cephadm/cephadm

index 988678a3b4a58e8bdb7c8830161a2688c199e0b1..e4086a423a27a28ad953117e5c1a62cae3fba6cb 100755 (executable)
@@ -4478,6 +4478,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,
@@ -7653,6 +7657,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)')