From: Michael Fritch Date: Wed, 11 Mar 2020 00:38:29 +0000 (-0600) Subject: cephadm: allow config and keyring args for ceph-volume X-Git-Tag: v15.2.1~42^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=214b49b2bcc068844a1132711e031ab57db0f662;p=ceph.git cephadm: allow config and keyring args for ceph-volume easier to script via the cephadm tests Signed-off-by: Michael Fritch (cherry picked from commit bac530f06a60d96259376cd19224bdbffce1bdc4) --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 64515caa1d87..c89ce1dea928 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2637,19 +2637,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, @@ -3972,6 +3969,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')