From 70cd884f42fc4ab8840f497efb61141f99fd5f31 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Tue, 13 Aug 2013 11:32:15 -0400 Subject: [PATCH] safer fallback. Updates docstring Signed-off-by: Alfredo Deza --- teuthology/task/ceph-deploy.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/teuthology/task/ceph-deploy.py b/teuthology/task/ceph-deploy.py index 7596e490baa5c..11f45185101ed 100644 --- a/teuthology/task/ceph-deploy.py +++ b/teuthology/task/ceph-deploy.py @@ -12,12 +12,21 @@ from ..orchestra import run log = logging.getLogger(__name__) + @contextlib.contextmanager def download_ceph_deploy(ctx, config): + """ + Downloads ceph-deploy from the ceph.com git mirror and (by default) + switches to the master branch. If the `ceph-deploy-branch` is specified, it + will use that instead. + """ log.info('Downloading ceph-deploy...') testdir = teuthology.get_testdir(ctx) ceph_admin = teuthology.get_first_mon(ctx, config) - ceph_deploy_branch = ctx.get('ceph-deploy', {}).get('ceph-deploy-branch', 'master') + default_cd_branch = {'ceph-deploy-branch': 'master'} + ceph_deploy_branch = ctx.get( + 'ceph-deploy', + default_cd_branch).get('ceph-deploy-branch', 'master') ctx.cluster.only(ceph_admin).run( args=[ @@ -47,6 +56,7 @@ def download_ceph_deploy(ctx, config): ], ) + def is_healthy(ctx, config): """Wait until a Ceph cluster is healthy.""" testdir = teuthology.get_testdir(ctx) -- 2.39.5