Procházet zdrojové kódy

Consolidate image diciontaries and strings

This commit defines most image strings and default
dictionaries into openshift_facts/defaults/main.yml
so there is no drift between components.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1570574
Michael Gugino před 6 roky
rodič
revize
29692bcb64
24 změnil soubory, kde provedl 77 přidání a 182 odebrání
  1. 11 11
      playbooks/common/openshift-cluster/upgrades/pre/config.yml
  2. 1 1
      playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
  3. 0 1
      roles/container_runtime/defaults/main.yml
  4. 0 8
      roles/kuryr/defaults/main.yaml
  5. 0 6
      roles/openshift_bootstrap_autoapprover/defaults/main.yaml
  6. 5 0
      roles/openshift_bootstrap_autoapprover/meta/main.yml
  7. 0 15
      roles/openshift_cli/defaults/main.yml
  8. 0 13
      roles/openshift_control_plane/defaults/main.yml
  9. 18 4
      roles/openshift_facts/defaults/main.yml
  10. 0 5
      roles/openshift_health_checker/defaults/main.yml
  11. 2 14
      roles/openshift_health_checker/openshift_checks/docker_image_availability.py
  12. 2 4
      roles/openshift_health_checker/openshift_checks/mixins.py
  13. 18 39
      roles/openshift_health_checker/test/docker_image_availability_test.py
  14. 4 4
      roles/openshift_health_checker/test/docker_storage_test.py
  15. 3 3
      roles/openshift_health_checker/test/mixins_test.py
  16. 3 3
      roles/openshift_health_checker/test/ovs_version_test.py
  17. 3 3
      roles/openshift_health_checker/test/package_availability_test.py
  18. 3 3
      roles/openshift_health_checker/test/package_version_test.py
  19. 2 22
      roles/openshift_node/defaults/main.yml
  20. 1 1
      roles/openshift_node/tasks/node_system_container.yml
  21. 0 10
      roles/openshift_node_group/defaults/main.yml
  22. 1 0
      roles/openshift_node_group/meta/main.yml
  23. 0 7
      roles/openshift_sdn/defaults/main.yml
  24. 0 5
      roles/openshift_web_console/defaults/main.yml

+ 11 - 11
playbooks/common/openshift-cluster/upgrades/pre/config.yml

@@ -23,6 +23,17 @@
     - openshift_http_proxy is defined or openshift_https_proxy is defined
     - openshift_generate_no_proxy_hosts | default(True) | bool
 
+- import_playbook: ../disable_excluders.yml
+
+- import_playbook: ../../../../init/version.yml
+  vars:
+    # Request specific openshift_release and let the openshift_version role handle converting this
+    # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if
+    # defined, and overriding the normal behavior of protecting the installed version
+    openshift_release: "{{ openshift_upgrade_target }}"
+    # openshift_protect_installed_version is passed n via upgrade_control_plane.yml
+    # l_openshift_version_set_hosts is passed via upgrade_control_plane.yml
+
 - name: OpenShift Health Checks
   hosts: "{{ l_upgrade_health_check_hosts }}"
   any_errors_fatal: true
@@ -39,17 +50,6 @@
       - memory_availability
       - docker_image_availability
 
-- import_playbook: ../disable_excluders.yml
-
-- import_playbook: ../../../../init/version.yml
-  vars:
-    # Request specific openshift_release and let the openshift_version role handle converting this
-    # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if
-    # defined, and overriding the normal behavior of protecting the installed version
-    openshift_release: "{{ openshift_upgrade_target }}"
-    # openshift_protect_installed_version is passed n via upgrade_control_plane.yml
-    # l_openshift_version_set_hosts is passed via upgrade_control_plane.yml
-
 - import_playbook: verify_cluster.yml
 
 # If we're only upgrading nodes, we need to ensure masters are already upgraded

+ 1 - 1
playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml

@@ -12,7 +12,7 @@
 
 - name: Verify containers are available for upgrade
   command: >
-    docker pull {{ openshift_cli_image }}:{{ openshift_image_tag }}
+    docker pull {{ openshift_cli_image }}
   register: pull_result
   changed_when: "'Downloaded newer image' in pull_result.stdout"
   when: openshift_is_containerized | bool

+ 0 - 1
roles/container_runtime/defaults/main.yml

@@ -89,7 +89,6 @@ l_crio_pause_images_dict:
   origin: 'docker.io/openshift/origin-${component}:${version}'
   openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
 l_pause_registry_url_default: "{{ l_crio_pause_images_dict[openshift_deployment_type] }}"
-l_os_registry_url: "{{ oreg_url_master | default(oreg_url) | default(l_pause_registry_url_default) | regex_replace('${version}' | regex_escape, l_openshift_image_tag | default('${version}')) }}"
 
 pause_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'pod') }}"
 

+ 0 - 8
roles/kuryr/defaults/main.yaml

@@ -87,11 +87,3 @@ kuryr_clusterrole:
         - services
         - services/status
         - routes
-
-# OpenShift-Node image definitions
-l_openshift_master_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
-l_osm_registry_url_default: "{{ l_openshift_master_images_dict[openshift_deployment_type] }}"
-l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
-osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"

+ 0 - 6
roles/openshift_bootstrap_autoapprover/defaults/main.yaml

@@ -1,7 +1 @@
 ---
-l_openshift_master_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
-l_osm_registry_url_default: "{{ l_openshift_master_images_dict[openshift_deployment_type] }}"
-l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
-osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"

+ 5 - 0
roles/openshift_bootstrap_autoapprover/meta/main.yml

@@ -0,0 +1,5 @@
+---
+dependencies:
+- role: lib_openshift
+- role: lib_utils
+- role: openshift_facts

+ 0 - 15
roles/openshift_cli/defaults/main.yml

@@ -1,17 +1,2 @@
 ---
-system_images_registry_dict:
-  openshift-enterprise: "registry.access.redhat.com"
-  origin: "docker.io"
-system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
-
-l_openshift_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
-l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
-l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
-openshift_image_default: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
-# not sure why this one is more complicated than other images
-openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary(openshift_image_default, (openshift_image_default.split('/')|length==2) | ternary(system_images_registry + '/' + openshift_image_default, openshift_image_default)) }}"
-system_openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + openshift_cli_image, openshift_cli_image) }}"
-
 l_openshift_cli_image_backend: "{{ (openshift_use_crio_only | bool) | ternary('atomic', 'docker') }}"

+ 0 - 13
roles/openshift_control_plane/defaults/main.yml

@@ -7,21 +7,8 @@ openshift_master_debug_level: "{{ debug_level | default(2) }}"
 r_openshift_master_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
 r_openshift_master_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
 
-l_openshift_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
-l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
-l_os_registry_url: "{{ oreg_url_master | default(oreg_url) | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
 openshift_imageconfig_format: "{{ oreg_url_master | default(oreg_url) | default(l_osm_registry_url_default) }}"
 
-osm_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'control-plane') }}"
-
-system_images_registry_dict:
-  openshift-enterprise: "registry.access.redhat.com"
-  origin: "docker.io"
-
-system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
-
 l_osm_id_providers_dict:
   openshift-enterprise:
   - name: 'deny_all'

+ 18 - 4
roles/openshift_facts/defaults/main.yml

@@ -1,14 +1,28 @@
 ---
 openshift_client_binary: "{{ (openshift_is_atomic | bool) | ternary('/usr/local/bin/oc', 'oc') }}"
 
-openshift_cli_image_dict:
-  origin: 'openshift/origin'
-  openshift-enterprise: 'openshift3/ose'
+system_images_registry_dict:
+  openshift-enterprise: "registry.access.redhat.com"
+  origin: "docker.io"
+system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
+
+l_openshift_images_dict:
+  origin: 'docker.io/openshift/origin-${component}:${version}'
+  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
+
+l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
+l_osm_registry_url: "{{ oreg_url_master | default(oreg_url) | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
+l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
+openshift_image_default: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
+# not sure why this one is more complicated than other images
+openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary(openshift_image_default, (openshift_image_default.split('/')|length==2) | ternary(system_images_registry + '/' + openshift_image_default, openshift_image_default)) }}"
+system_openshift_cli_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + openshift_cli_image, openshift_cli_image) }}"
+osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
+osm_image: "{{ l_osm_registry_url | regex_replace('${component}' | regex_escape, 'control-plane') }}"
 
 repoquery_cmd: "{{ (ansible_pkg_mgr == 'dnf') | ternary('dnf repoquery --latest-limit 1 -d 0', 'repoquery --plugins') }}"
 repoquery_installed: "{{ (ansible_pkg_mgr == 'dnf') | ternary('dnf repoquery --latest-limit 1 -d 0 --disableexcludes=all --installed', 'repoquery --plugins --installed') }}"
 
-openshift_cli_image: "{{ osm_image | default(openshift_cli_image_dict[openshift_deployment_type]) }}"
 openshift_use_crio_only: False
 
 # osm_default_subdomain is an old migrated fact, can probably be removed.

+ 0 - 5
roles/openshift_health_checker/defaults/main.yml

@@ -1,6 +1 @@
 ---
-openshift_service_type_dict:
-  origin: origin
-  openshift-enterprise: atomic-openshift
-
-openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"

+ 2 - 14
roles/openshift_health_checker/openshift_checks/docker_image_availability.py

@@ -173,21 +173,9 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):
             if self.get_var("osm_use_cockpit", default=True, convert=bool):
                 required.add(self._registry_console_image(image_tag, image_info))
 
-        # images for containerized components
-        def add_var_or_default_img(var_name, comp_name):
-            """Returns: default image from comp_name, overridden by var_name in task_vars"""
-            default = "{}/{}:{}".format(image_info["namespace"], comp_name, image_tag)
-            required.add(self.template_var(self.get_var(var_name, default=default)))
-
-        if self.get_var("openshift_is_containerized", convert=bool):
+        if self.get_var("openshift_is_atomic", convert=bool):
             if 'oo_nodes_to_config' in host_groups:
-                add_var_or_default_img("osn_image", image_info["name"] + "-node")
-            if 'oo_masters_to_config' in host_groups:  # name is "origin" or "ose"
-                add_var_or_default_img("osm_image", image_info["name"] + "-control-plane")
-            if 'oo_etcd_to_config' in host_groups:
-                # special case, note default is the same for origin/enterprise and has no image tag
-                etcd_img = self.get_var("osm_etcd_image", default="registry.access.redhat.com/rhel7/etcd")
-                required.add(self.template_var(etcd_img))
+                required.add(self.template_var(self.get_var('osn_image', default='')))
 
         return required
 

+ 2 - 4
roles/openshift_health_checker/openshift_checks/mixins.py

@@ -10,8 +10,8 @@ class NotContainerizedMixin(object):
 
     def is_active(self):
         """Only run on non-containerized hosts."""
-        openshift_is_containerized = self.get_var("openshift_is_containerized")
-        return super(NotContainerizedMixin, self).is_active() and not openshift_is_containerized
+        openshift_is_atomic = self.get_var("openshift_is_atomic")
+        return super(NotContainerizedMixin, self).is_active() and not openshift_is_atomic
 
 
 class DockerHostMixin(object):
@@ -23,8 +23,6 @@ class DockerHostMixin(object):
         """Only run on hosts that depend on Docker."""
         group_names = set(self.get_var("group_names", default=[]))
         needs_docker = set(["oo_nodes_to_config"])
-        if self.get_var("openshift_is_containerized"):
-            needs_docker.update(["oo_masters_to_config", "oo_etcd_to_config"])
         return super(DockerHostMixin, self).is_active() and bool(group_names.intersection(needs_docker))
 
     def ensure_dependencies(self):

+ 18 - 39
roles/openshift_health_checker/test/docker_image_availability_test.py

@@ -7,7 +7,6 @@ from openshift_checks.docker_image_availability import DockerImageAvailability,
 def task_vars():
     return dict(
         openshift_is_atomic=False,
-        openshift_is_containerized=False,
         openshift_service_type='origin',
         openshift_deployment_type='origin',
         openshift_image_tag='',
@@ -15,7 +14,7 @@ def task_vars():
     )
 
 
-@pytest.mark.parametrize('deployment_type, openshift_is_containerized, group_names, expect_active', [
+@pytest.mark.parametrize('deployment_type, openshift_is_atomic, group_names, expect_active', [
     ("invalid", True, [], False),
     ("", True, [], False),
     ("origin", False, [], False),
@@ -25,20 +24,20 @@ def task_vars():
     ("origin", True, ["nfs"], False),
     ("openshift-enterprise", True, ["lb"], False),
 ])
-def test_is_active(task_vars, deployment_type, openshift_is_containerized, group_names, expect_active):
+def test_is_active(task_vars, deployment_type, openshift_is_atomic, group_names, expect_active):
     task_vars['openshift_deployment_type'] = deployment_type
-    task_vars['openshift_is_containerized'] = openshift_is_containerized
+    task_vars['openshift_is_atomic'] = openshift_is_atomic
     task_vars['group_names'] = group_names
     assert DockerImageAvailability(None, task_vars).is_active() == expect_active
 
 
-@pytest.mark.parametrize("openshift_is_containerized,openshift_is_atomic", [
-    (True, True),
-    (False, False),
-    (True, False),
-    (False, True),
+@pytest.mark.parametrize("openshift_is_atomic", [
+    True,
+    False,
+    True,
+    False,
 ])
-def test_all_images_available_locally(task_vars, openshift_is_containerized, openshift_is_atomic):
+def test_all_images_available_locally(task_vars, openshift_is_atomic):
     def execute_module(module_name, module_args, *_):
         if module_name == "yum":
             return {}
@@ -50,7 +49,6 @@ def test_all_images_available_locally(task_vars, openshift_is_containerized, ope
             'images': [module_args['name']],
         }
 
-    task_vars['openshift_is_containerized'] = openshift_is_containerized
     task_vars['openshift_is_atomic'] = openshift_is_atomic
     result = DockerImageAvailability(execute_module, task_vars).run()
 
@@ -167,7 +165,7 @@ def test_registry_availability(image, registries, connection_test_failed, skopeo
     assert expect_registries_reached == check.reachable_registries
 
 
-@pytest.mark.parametrize("deployment_type, openshift_is_containerized, groups, oreg_url, expected", [
+@pytest.mark.parametrize("deployment_type, openshift_is_atomic, groups, oreg_url, expected", [
     (  # standard set of stuff required on nodes
         "origin", False, ['oo_nodes_to_config'], "",
         set([
@@ -198,9 +196,7 @@ def test_registry_availability(image, registries, connection_test_failed, skopeo
             'openshift/origin-haproxy-router:vtest',
             'cockpit/kubernetes:latest',
             # containerized component images
-            'openshift/origin-control-plane:vtest',
-            'openshift/origin-node:vtest',
-            'registry.access.redhat.com/rhel7/etcd',
+            'openshift3/ose-node:vtest',
         ])
     ),
     (  # enterprise images
@@ -216,23 +212,16 @@ def test_registry_availability(image, registries, connection_test_failed, skopeo
             'openshift3/ose-node:vtest',
         ])
     ),
-    (
-        "openshift-enterprise", True, ['oo_etcd_to_config', 'lb'], 'foo.io/openshift3/ose-${component}:f13ac45',
-        set([
-            'registry.access.redhat.com/rhel7/etcd',
-            # lb does not yet come in a containerized version
-        ])
-    ),
 
 ])
-def test_required_images(deployment_type, openshift_is_containerized, groups, oreg_url, expected):
+def test_required_images(deployment_type, openshift_is_atomic, groups, oreg_url, expected):
     task_vars = dict(
-        openshift_is_containerized=openshift_is_containerized,
-        openshift_is_atomic=False,
+        openshift_is_atomic=openshift_is_atomic,
         openshift_deployment_type=deployment_type,
         group_names=groups,
         oreg_url=oreg_url,
         openshift_image_tag='vtest',
+        osn_image='openshift3/ose-node:vtest',
     )
 
     assert expected == DockerImageAvailability(task_vars=task_vars).required_images()
@@ -279,9 +268,10 @@ def test_registry_console_image(task_vars, expected):
         dict(
             group_names=['oo_nodes_to_config'],
             openshift_image_tag="veggs",
+            osn_image="openshift3/ose-node:vtest",
         ),
         set([
-            'openshift/origin-node:veggs', 'cockpit/kubernetes:latest',
+            'openshift3/ose-node:vtest', 'cockpit/kubernetes:latest',
             'openshift/origin-haproxy-router:veggs', 'openshift/origin-deployer:veggs',
             'openshift/origin-docker-registry:veggs', 'openshift/origin-pod:veggs',
         ]),
@@ -289,23 +279,12 @@ def test_registry_console_image(task_vars, expected):
         dict(
             group_names=['oo_masters_to_config'],
         ),
-        set(['openshift/origin-control-plane:latest']),
-    ), (
-        dict(
-            group_names=['oo_etcd_to_config'],
-        ),
-        set(['registry.access.redhat.com/rhel7/etcd']),
-    ), (
-        dict(
-            group_names=['oo_etcd_to_config'],
-            osm_etcd_image='spam/etcd',
-        ),
-        set(['spam/etcd']),
+        set(),
     ),
 ])
 def test_containerized(task_vars, expected):
     task_vars.update(dict(
-        openshift_is_containerized=True,
+        openshift_is_atomic=True,
         openshift_deployment_type="origin",
     ))
 

+ 4 - 4
roles/openshift_health_checker/test/docker_storage_test.py

@@ -4,14 +4,14 @@ from openshift_checks import OpenShiftCheckException
 from openshift_checks.docker_storage import DockerStorage
 
 
-@pytest.mark.parametrize('openshift_is_containerized, group_names, is_active', [
+@pytest.mark.parametrize('openshift_is_atomic, group_names, is_active', [
     (False, ["oo_masters_to_config", "oo_etcd_to_config"], False),
     (False, ["oo_masters_to_config", "oo_nodes_to_config"], True),
-    (True, ["oo_etcd_to_config"], True),
+    (True, ["oo_etcd_to_config"], False),
 ])
-def test_is_active(openshift_is_containerized, group_names, is_active):
+def test_is_active(openshift_is_atomic, group_names, is_active):
     task_vars = dict(
-        openshift_is_containerized=openshift_is_containerized,
+        openshift_is_atomic=openshift_is_atomic,
         group_names=group_names,
     )
     assert DockerStorage(None, task_vars).is_active() == is_active

+ 3 - 3
roles/openshift_health_checker/test/mixins_test.py

@@ -10,8 +10,8 @@ class NotContainerizedCheck(NotContainerizedMixin, OpenShiftCheck):
 
 
 @pytest.mark.parametrize('task_vars,expected', [
-    (dict(openshift_is_containerized=False), True),
-    (dict(openshift_is_containerized=True), False),
+    (dict(openshift_is_atomic=False), True),
+    (dict(openshift_is_atomic=True), False),
 ])
 def test_is_active(task_vars, expected):
     assert NotContainerizedCheck(None, task_vars).is_active() == expected
@@ -20,4 +20,4 @@ def test_is_active(task_vars, expected):
 def test_is_active_missing_task_vars():
     with pytest.raises(OpenShiftCheckException) as excinfo:
         NotContainerizedCheck().is_active()
-    assert 'openshift_is_containerized' in str(excinfo.value)
+    assert 'openshift_is_atomic' in str(excinfo.value)

+ 3 - 3
roles/openshift_health_checker/test/ovs_version_test.py

@@ -57,7 +57,7 @@ def test_ovs_package_version(openshift_release, expected_ovs_version):
     assert result is return_value
 
 
-@pytest.mark.parametrize('group_names,openshift_is_containerized,is_active', [
+@pytest.mark.parametrize('group_names,openshift_is_atomic,is_active', [
     (['oo_masters_to_config'], False, True),
     # ensure check is skipped on containerized installs
     (['oo_masters_to_config'], True, False),
@@ -69,9 +69,9 @@ def test_ovs_package_version(openshift_release, expected_ovs_version):
     (['lb'], False, False),
     (['nfs'], False, False),
 ])
-def test_ovs_version_skip_when_not_master_nor_node(group_names, openshift_is_containerized, is_active):
+def test_ovs_version_skip_when_not_master_nor_node(group_names, openshift_is_atomic, is_active):
     task_vars = dict(
         group_names=group_names,
-        openshift_is_containerized=openshift_is_containerized,
+        openshift_is_atomic=openshift_is_atomic,
     )
     assert OvsVersion(None, task_vars).is_active() == is_active

+ 3 - 3
roles/openshift_health_checker/test/package_availability_test.py

@@ -3,16 +3,16 @@ import pytest
 from openshift_checks.package_availability import PackageAvailability
 
 
-@pytest.mark.parametrize('pkg_mgr,openshift_is_containerized,is_active', [
+@pytest.mark.parametrize('pkg_mgr,openshift_is_atomic,is_active', [
     ('yum', False, True),
     ('yum', True, False),
     ('dnf', True, False),
     ('dnf', False, False),
 ])
-def test_is_active(pkg_mgr, openshift_is_containerized, is_active):
+def test_is_active(pkg_mgr, openshift_is_atomic, is_active):
     task_vars = dict(
         ansible_pkg_mgr=pkg_mgr,
-        openshift_is_containerized=openshift_is_containerized,
+        openshift_is_atomic=openshift_is_atomic,
     )
     assert PackageAvailability(None, task_vars).is_active() == is_active
 

+ 3 - 3
roles/openshift_health_checker/test/package_version_test.py

@@ -69,7 +69,7 @@ def test_package_version(openshift_release):
     assert result == return_value
 
 
-@pytest.mark.parametrize('group_names,openshift_is_containerized,is_active', [
+@pytest.mark.parametrize('group_names,openshift_is_atomic,is_active', [
     (['oo_masters_to_config'], False, True),
     # ensure check is skipped on containerized installs
     (['oo_masters_to_config'], True, False),
@@ -81,9 +81,9 @@ def test_package_version(openshift_release):
     (['lb'], False, False),
     (['nfs'], False, False),
 ])
-def test_package_version_skip_when_not_master_nor_node(group_names, openshift_is_containerized, is_active):
+def test_package_version_skip_when_not_master_nor_node(group_names, openshift_is_atomic, is_active):
     task_vars = dict(
         group_names=group_names,
-        openshift_is_containerized=openshift_is_containerized,
+        openshift_is_atomic=openshift_is_atomic,
     )
     assert PackageVersion(None, task_vars).is_active() == is_active

+ 2 - 22
roles/openshift_node/defaults/main.yml

@@ -10,23 +10,8 @@ openshift_node_proxy_mode: iptables
 openshift_set_node_ip: False
 openshift_config_base: '/etc/origin'
 
-openshift_deployment_type: "{{ openshift_deployment_type | default('origin') }}"
-
-system_images_registry_dict:
-  openshift-enterprise: "registry.access.redhat.com"
-  origin: "docker.io"
-
-system_images_registry: "{{ system_images_registry_dict[openshift_deployment_type | default('origin')] }}"
-
-l_openshift_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
-l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
-l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
-
-osn_image_default: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
-osn_image: "{{ (system_images_registry == 'docker') | ternary(osn_image_default, (osn_image_default.split('/')|length==2) | ternary(system_images_registry + '/' + osn_image_default, osn_image_default)) }}"
-system_osn_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + osn_image, osn_image) }}"
+l_osn_image: "{{ (system_images_registry == 'docker') | ternary(osn_image, (osn_image.split('/')|length==2) | ternary(system_images_registry + '/' + osn_image, osn_image)) }}"
+system_osn_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + l_osn_image, l_osn_image) }}"
 
 openshift_oreg_url_default_dict:
   origin: "openshift/origin-${component}:${version}"
@@ -110,11 +95,6 @@ openshift_node_syscon_auth_mounts_l:
 # This should be in the same format as auth_mounts_l above.
 openshift_node_syscon_add_mounts_l: []
 
-openshift_service_type_dict:
-  origin: origin
-  openshift-enterprise: atomic-openshift
-openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"
-
 default_r_openshift_node_image_prep_packages:
 - "{{ openshift_service_type }}-node"
 - "{{ openshift_service_type }}-docker-excluder"

+ 1 - 1
roles/openshift_node/tasks/node_system_container.yml

@@ -28,7 +28,7 @@
 - name: Install or Update node system container
   oc_atomic_container:
     name: "{{ openshift_service_type }}-node"
-    image: "{{ osn_image }}"
+    image: "{{ system_osn_image }}"
     values:
     - "DNS_DOMAIN={{ openshift.common.dns_domain }}"
     - "DOCKER_SERVICE={{ openshift_docker_service_name }}.service"

+ 0 - 10
roles/openshift_node_group/defaults/main.yml

@@ -28,16 +28,6 @@ openshift_node_group_network_plugin: "{{ openshift_node_group_network_plugin_def
 openshift_node_group_node_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
 openshift_node_group_node_data_dir: "{{ openshift_node_group_node_data_dir_default }}"
 
-l_openshift_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
-l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
-l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
 openshift_imageconfig_format: "{{ oreg_url | default(l_osm_registry_url_default) }}"
-osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
 
-openshift_service_type_dict:
-  origin: origin
-  openshift-enterprise: atomic-openshift
-openshift_service_type: "{{ openshift_service_type_dict[openshift_deployment_type] }}"
 openshift_node_group_use_persistentlocalvolumes: "{{ openshift_persistentlocalstorage_enabled | default(False) | bool }}"

+ 1 - 0
roles/openshift_node_group/meta/main.yml

@@ -2,3 +2,4 @@
 dependencies:
 - role: lib_openshift
 - role: lib_utils
+- role: openshift_facts

+ 0 - 7
roles/openshift_sdn/defaults/main.yml

@@ -1,9 +1,2 @@
 ---
-l_openshift_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
-l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
-l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
-osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
-
 openshift_use_external_openvswitch: false

+ 0 - 5
roles/openshift_web_console/defaults/main.yml

@@ -4,11 +4,6 @@ openshift_web_console_nodeselector: {"node-role.kubernetes.io/master":"true"}
 __console_template_file: "console-template.yaml"
 __console_config_file: "console-config.yaml"
 
-l_openshift_master_images_dict:
-  origin: 'docker.io/openshift/origin-${component}:${version}'
-  openshift-enterprise: 'registry.access.redhat.com/openshift3/ose-${component}:${version}'
-l_osm_registry_url_default: "{{ l_openshift_master_images_dict[openshift_deployment_type] }}"
-l_osm_registry_url: "{{ oreg_url_master | default(oreg_url) | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
 openshift_web_console_image_name: "{{ l_osm_registry_url | regex_replace('${component}' | regex_escape, 'web-console') }}"
 
 # Default the replica count to the number of masters.