From 055bf73d500e2317c51c9bf6c702ecc531c220d1 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 12 Sep 2012 11:30:40 -0700 Subject: [PATCH] rbd: only specify --format if not using the default This lets older versions that do not support --format still work with format 1 images. --- teuthology/task/rbd.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/teuthology/task/rbd.py b/teuthology/task/rbd.py index 625d623672cfb..56b851962440e 100644 --- a/teuthology/task/rbd.py +++ b/teuthology/task/rbd.py @@ -51,9 +51,8 @@ def create_image(ctx, config): (remote,) = ctx.cluster.only(role).remotes.keys() log.info('Creating image {name} with size {size}'.format(name=name, size=size)) - remote.run( - args=[ - 'LD_LIBRARY_PATH=/tmp/cephtest/binary/usr/local/lib', + args = [ + 'LD_LIBRARY_PATH=/tmp/cephtest/binary/usr/local/lib', '/tmp/cephtest/enable-coredump', '/tmp/cephtest/binary/usr/local/bin/ceph-coverage', '/tmp/cephtest/archive/coverage', @@ -61,11 +60,14 @@ def create_image(ctx, config): '-c', '/tmp/cephtest/ceph.conf', '-p', 'rbd', 'create', - '--format', str(fmt), '--size', str(size), name, - ], - ) + ] + # omit format option if using the default (format 1) + # since old versions of don't support it + if format != 1: + args += ['--format', str(fmt)] + remote.run(args=args) try: yield finally: -- 2.39.5