]> 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>
Thu, 3 Jun 2021 12:37:39 +0000 (07:37 -0500)
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 693fd30532760067a262f381fb3487deae52f689)

src/cephadm/cephadm

index aac7331515b069f81804c517bdd38787f309b65f..8084539473393edc676407e82755708e15b5833b 100755 (executable)
@@ -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)')