From 96a6efb7e92afc0ad9f8899bbc2cefbc169c7ede Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Mon, 6 Mar 2017 16:27:39 -0500 Subject: preflight checks: refactor and fix aos_version Bring in openshift_repos to provide Origin repo before checks on Origin. For OCP we want the check to fail if both version 3.3 and version 3.4 are available - they shouldn't have both channels enabled. For Origin everything is in one repo so it's not surprising to find 1.4 and 1.5 versions available. Added unit tests as well. --- .../openshift_health_checker/openshift_checks/package_version.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'roles/openshift_health_checker/openshift_checks/package_version.py') diff --git a/roles/openshift_health_checker/openshift_checks/package_version.py b/roles/openshift_health_checker/openshift_checks/package_version.py index 42193a1c6..cca2d8b75 100644 --- a/roles/openshift_health_checker/openshift_checks/package_version.py +++ b/roles/openshift_health_checker/openshift_checks/package_version.py @@ -10,11 +10,9 @@ class PackageVersion(NotContainerizedMixin, OpenShiftCheck): tags = ["preflight"] def run(self, tmp, task_vars): - rpm_prefix = get_var(task_vars, "openshift", "common", "service_type") - openshift_release = get_var(task_vars, "openshift_release") - args = { - "prefix": rpm_prefix, - "version": openshift_release, + "requested_openshift_release": get_var(task_vars, "openshift_release", default=''), + "openshift_deployment_type": get_var(task_vars, "openshift_deployment_type"), + "rpm_prefix": get_var(task_vars, "openshift", "common", "service_type"), } return self.execute_module("aos_version", args, tmp, task_vars) -- cgit v1.2.1