]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: allow config and keyring args for ceph-volume
authorMichael Fritch <mfritch@suse.com>
Wed, 11 Mar 2020 00:38:29 +0000 (18:38 -0600)
committerMichael Fritch <mfritch@suse.com>
Fri, 20 Mar 2020 13:55:26 +0000 (07:55 -0600)
easier to script via the cephadm tests

Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/cephadm

index af145a459bb9a6764e66cbb2cbe7b565d688ac39..cee57ea249b6557c0fc10b7c2928add9a5eb6cd3 100755 (executable)
@@ -2600,19 +2600,16 @@ def command_ceph_volume():
     tmp_config = None
     tmp_keyring = None
 
-    if args.config_json:
-        # note: this will always pull from args.config_json (we
-        # require it) and never args.config or args.keyring.
-        (config, keyring) = get_config_and_keyring()
+    (config, keyring) = get_config_and_keyring()
 
-        # tmp keyring file
-        tmp_keyring = write_tmp(keyring, uid, gid)
+    # tmp keyring file
+    tmp_keyring = write_tmp(keyring, uid, gid)
 
-        # tmp config file
-        tmp_config = write_tmp(config, uid, gid)
+    # tmp config file
+    tmp_config = write_tmp(config, uid, gid)
 
-        mounts[tmp_config.name] = '/etc/ceph/ceph.conf:z'
-        mounts[tmp_keyring.name] = '/var/lib/ceph/bootstrap-osd/ceph.keyring:z'
+    mounts[tmp_config.name] = '/etc/ceph/ceph.conf:z'
+    mounts[tmp_keyring.name] = '/var/lib/ceph/bootstrap-osd/ceph.keyring:z'
 
     c = CephContainer(
         image=args.image,
@@ -3949,6 +3946,12 @@ def _get_parser():
     parser_ceph_volume.add_argument(
         '--config-json',
         help='JSON file with config and (client.bootrap-osd) key')
+    parser_ceph_volume.add_argument(
+        '--config', '-c',
+        help='ceph conf file')
+    parser_ceph_volume.add_argument(
+        '--keyring', '-k',
+        help='ceph.keyring to pass through to the container')
     parser_ceph_volume.add_argument(
         'command', nargs='+',
         help='command')