From 536961ff2ac224ab0824ec3bd99786b1ccec86d3 Mon Sep 17 00:00:00 2001 From: Ben Parees Date: Oct 20 2020 02:07:58 +0000 Subject: Merge pull request #12252 from syedriko/bz_1848454_revert Revert "Bug 1848454: OpenShift logging upgrade from 3.11.161 to 3.11.219 fails" --- diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml index f39c15b..0d557cb 100644 --- a/roles/openshift_logging/tasks/install_logging.yaml +++ b/roles/openshift_logging/tasks/install_logging.yaml @@ -65,8 +65,7 @@ with_sequence: count={{ openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count }} when: openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count > 0 -- set_fact: - es_indices: [] +- set_fact: es_indices=[] when: openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count == 0 - set_fact: openshift_logging_es_pvc_prefix="logging-es" @@ -83,13 +82,6 @@ - set_fact: default_elasticsearch_storage_type: "{{ 'pvc' if ( openshift_logging_es_pvc_dynamic | bool or openshift_logging_storage_kind | default('') == 'nfs' or openshift_logging_es_pvc_size | length > 0) else 'emptydir' }}" -# Pre-condition check for the following include_role, to make sure the lists in with_together are -# the same length and do not get padded with Nones -# -- fail: - msg: There must be the same number of ES DeploymentConfigs, ES PVCs and ES indices. Found ES DeploymentConfigs - "{{ openshift_logging_facts.elasticsearch.deploymentconfigs.keys() }}", ES DC count - "{{ openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count }}", ES PVCs - "{{ openshift_logging_facts.elasticsearch.pvcs }}", ES PVC length - "{{ openshift_logging_facts.elasticsearch.pvcs | length }}" and ES indices - "{{ es_indices }}", ES indices length - "{{ es_indices | length }}" - when: (openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count != openshift_logging_facts.elasticsearch.pvcs | length) or (openshift_logging_facts.elasticsearch.pvcs | length != es_indices | length) or (openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count != es_indices | length) - - include_role: name: openshift_logging_elasticsearch vars: @@ -153,8 +145,7 @@ - openshift_logging_use_ops | bool - openshift_logging_facts.elasticsearch_ops.deploymentconfigs.keys() | count > 0 -- set_fact: - es_ops_indices: [] +- set_fact: es_ops_indices=[] when: openshift_logging_facts.elasticsearch_ops.deploymentconfigs.keys() | count == 0 - set_fact: openshift_logging_es_ops_pvc_prefix="logging-es-ops" @@ -165,15 +156,6 @@ when: - openshift_logging_use_ops | bool -# Pre-condition check for the following include_role, to make sure the lists in with_together are -# the same length and do not get padded with Nones -# -- fail: - msg: There must be the same number of ES DeploymentConfigs, ES PVCs and ES Ops indices. Found ES DeploymentConfigs - "{{ openshift_logging_facts.elasticsearch.deploymentconfigs.keys() }}", ES PVCs - "{{ openshift_logging_facts.elasticsearch.pvcs }}" and ES Ops indices - "{{ es_ops_indices }}" - when: - - (openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count != openshift_logging_facts.elasticsearch.pvcs | length) or (openshift_logging_facts.elasticsearch.pvcs | length != es_ops_indices | length) or (openshift_logging_facts.elasticsearch.deploymentconfigs.keys() | count != es_ops_indices | length) - - openshift_logging_use_ops | bool - - include_role: name: openshift_logging_elasticsearch vars: