From af1384dffdf1002d0ba2e34f61447131c8eddec4 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 5 Mar 2015 09:59:25 -0700 Subject: [PATCH] Add optional exclude_packages arg to upgrade Signed-off-by: Zack Cerza --- teuthology/task/install.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 """ -- 2.39.5