diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-06-09 12:48:40 -0300 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-06-10 10:42:04 -0300 |
commit | bcf414e8b559d35909f26420d9e7dec3cd0a1897 (patch) | |
tree | ef89779f1deaff5c19d10c6d8addca9e427c1530 | |
parent | 00eb0c79ed65543b3d358ae71b1a40fcbc88d78b (diff) | |
download | openshift-bcf414e8b559d35909f26420d9e7dec3cd0a1897.tar.gz openshift-bcf414e8b559d35909f26420d9e7dec3cd0a1897.tar.bz2 openshift-bcf414e8b559d35909f26420d9e7dec3cd0a1897.tar.xz openshift-bcf414e8b559d35909f26420d9e7dec3cd0a1897.zip |
Fix missing openshift.common.version fact on containerized nodes.
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml | 2 | ||||
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml index 42641f2eb..770ccaa78 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_1_to_v3_2/pre.yml @@ -107,7 +107,9 @@ hosts: oo_nodes_to_config roles: - openshift_facts + - openshift_docker_facts tasks: + - debug: var=openshift.docker.openshift_version - name: Ensure Node is running service: name: "{{ openshift.common.service_type }}-node" diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 8824a663c..856dcbdb8 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -1138,6 +1138,9 @@ def get_openshift_version(facts): # and is falsely acting like openshift is already installed _, output, _ = module.run_command(['/usr/local/bin/openshift', 'version']) version = parse_openshift_version(output) + elif 'node' in facts and 'common' in facts and 'is_containerized' in facts['common']: + _, output, _ = module.run_command(['docker', 'run', '--rm', facts['common']['cli_image'], 'version']) + version = parse_openshift_version(output) return version |