]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
install: make overrides grouped by project
authorSage Weil <sage@inktank.com>
Sat, 18 May 2013 01:53:02 +0000 (18:53 -0700)
committerSage Weil <sage@inktank.com>
Sat, 18 May 2013 01:53:02 +0000 (18:53 -0700)
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 <sage@inktank.com>
schedule_suite.sh
teuthology/task/install.py

index 87bf0486c67d470f7460ac27b3e07d1ac7e8a325..dcf7cbebb1cc05455c82843f87ae3a3313f3f451 100755 (executable)
@@ -70,7 +70,8 @@ overrides:
   s3tests:
     branch: $s3branch
   install:
-    sha1: $CEPH_SHA1
+    ceph:
+      sha1: $CEPH_SHA1
   ceph:
     sha1: $CEPH_SHA1
     conf:
index 1fd9975e7c8c9d0b368fce097a456f827909b320..c5fa569f1d47d467b8efa349135b060f7e1465d2 100644 (file)
@@ -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