]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add optional exclude_packages arg to upgrade 450/head
authorZack Cerza <zack@redhat.com>
Thu, 5 Mar 2015 16:59:25 +0000 (09:59 -0700)
committerZack Cerza <zack@redhat.com>
Thu, 5 Mar 2015 17:01:21 +0000 (10:01 -0700)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/task/install.py

index 55effdceb55208c4c624d286d026a4ece2ad3014..4f235b8459485d9fbda8d2250de1b3b6b806d902 100644 (file)
@@ -1033,6 +1033,8 @@ def upgrade_common(ctx, config, deploy_style):
         system_type = teuthology.get_system_type(remote)
         assert system_type in ('deb', 'rpm')
         pkgs = PACKAGES[project][system_type]
+        excluded_packages = config.get('exclude_packages', list())
+        pkgs = list(set(pkgs).difference(set(excluded_packages)))
         log.info("Upgrading {proj} {system_type} packages: {pkgs}".format(
             proj=project, system_type=system_type, pkgs=', '.join(pkgs)))
             # FIXME: again, make extra_pkgs distro-agnostic
@@ -1074,6 +1076,12 @@ docstring_for_upgrade = """"
     (HACK: the overrides will *only* apply the sha1/branch/tag if those
     keys are not present in the config.)
 
+    It is also possible to attempt to exclude packages from the upgrade set:
+
+        tasks:
+        - install.{cmd_parameter}:
+            exclude_packages: ['ceph-test', 'ceph-test-dbg']
+
     :param ctx: the argparse.Namespace object
     :param config: the config dict
     """