From d7ec0892808848a4c1875499c1cfeb3f1dae701d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 17 May 2013 18:53:02 -0700 Subject: [PATCH] install: make overrides grouped by project This lets us set different overrides for e.g. ceph vs samba, and makes it so the schedule_teuthology.sh overrides don't specify a ceph sha1 for samba installs. Signed-off-by: Sage Weil --- schedule_suite.sh | 3 ++- teuthology/task/install.py | 26 +++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/schedule_suite.sh b/schedule_suite.sh index 87bf0486c67d4..dcf7cbebb1cc0 100755 --- a/schedule_suite.sh +++ b/schedule_suite.sh @@ -70,7 +70,8 @@ overrides: s3tests: branch: $s3branch install: - sha1: $CEPH_SHA1 + ceph: + sha1: $CEPH_SHA1 ceph: sha1: $CEPH_SHA1 conf: diff --git a/teuthology/task/install.py b/teuthology/task/install.py index 1fd9975e7c8c9..c5fa569f1d47d 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -637,14 +637,34 @@ def upgrade(ctx, config): def task(ctx, config): """ Install packages + + tasks: + - install: + project: ceph + branch: bar + - install: + project: samba + branch: foo + extra_packages: ['samba'] + + Overrides are project specific: + + overrides: + install: + ceph: + sha1: ... + """ if config is None: config = {} assert isinstance(config, dict), \ "task install only supports a dictionary for configuration" - overrides = ctx.config.get('overrides', {}) - teuthology.deep_merge(config, overrides.get('install', {})) + project, = config.get('project', 'ceph'), + log.debug('project %s' % project) + overrides = ctx.config.get('overrides', {}).get('install', {}) + teuthology.deep_merge(config, overrides.get(project, {})) + log.debug('config %s' % config) # Flavor tells us what gitbuilder to fetch the prebuilt software # from. It's a combination of possible keywords, in a specific @@ -677,7 +697,7 @@ def task(ctx, config): extra_packages=config.get('extra_packages', []), extras=config.get('extras',None), wait_for_package=ctx.config.get('wait-for-package', False), - project=config.get('project', 'ceph'), + project=project, )), ): yield -- 2.39.5