From: Zack Cerza Date: Thu, 5 Mar 2015 16:59:25 +0000 (-0700) Subject: Add optional exclude_packages arg to upgrade X-Git-Tag: 1.1.0~988^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=af1384dffdf1002d0ba2e34f61447131c8eddec4;p=teuthology.git Add optional exclude_packages arg to upgrade Signed-off-by: Zack Cerza --- diff --git a/teuthology/task/install.py b/teuthology/task/install.py index 55effdceb5..4f235b8459 100644 --- a/teuthology/task/install.py +++ b/teuthology/task/install.py @@ -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 """