mirror of
https://github.com/ceph/ceph
synced 2025-01-29 06:24:03 +00:00
qa/tasks/cephadm: allow mounting volumes in shell
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
693fd30532
commit
b711a75277
@ -986,11 +986,11 @@ def shell(ctx, config):
|
||||
"""
|
||||
cluster_name = config.get('cluster', 'ceph')
|
||||
|
||||
env = []
|
||||
if 'env' in config:
|
||||
for k in config['env']:
|
||||
env.extend(['-e', k + '=' + ctx.config.get(k, '')])
|
||||
del config['env']
|
||||
args = []
|
||||
for k in config.pop('env', []):
|
||||
args.extend(['-e', k + '=' + ctx.config.get(k, '')])
|
||||
for k in config.pop('volumes', []):
|
||||
args.extend(['-v', k])
|
||||
|
||||
if 'all-roles' in config and len(config) == 1:
|
||||
a = config['all-roles']
|
||||
@ -1008,12 +1008,12 @@ def shell(ctx, config):
|
||||
for c in cmd:
|
||||
_shell(ctx, cluster_name, remote,
|
||||
['bash', '-c', subst_vip(ctx, c)],
|
||||
extra_cephadm_args=env)
|
||||
extra_cephadm_args=args)
|
||||
else:
|
||||
assert isinstance(cmd, str)
|
||||
_shell(ctx, cluster_name, remote,
|
||||
['bash', '-ex', '-c', subst_vip(ctx, cmd)],
|
||||
extra_cephadm_args=env)
|
||||
extra_cephadm_args=args)
|
||||
|
||||
|
||||
def apply(ctx, config):
|
||||
|
Loading…
Reference in New Issue
Block a user