summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging/tasks
diff options
context:
space:
mode:
authorewolinetz <ewolinet@redhat.com>2017-01-27 14:03:08 -0600
committerewolinetz <ewolinet@redhat.com>2017-01-27 14:15:30 -0600
commite74014e76be5b5eef6fe8ad639dc63913703b53b (patch)
tree5e2764d06414b07777721bd867c603064b62b04b /roles/openshift_logging/tasks
parent8ba0486209497183846152dcb2065faa2f6c1345 (diff)
downloadopenshift-e74014e76be5b5eef6fe8ad639dc63913703b53b.tar.gz
openshift-e74014e76be5b5eef6fe8ad639dc63913703b53b.tar.bz2
openshift-e74014e76be5b5eef6fe8ad639dc63913703b53b.tar.xz
openshift-e74014e76be5b5eef6fe8ad639dc63913703b53b.zip
Only manual scale down being allowed now
Diffstat (limited to 'roles/openshift_logging/tasks')
-rw-r--r--roles/openshift_logging/tasks/install_elasticsearch.yaml4
-rw-r--r--roles/openshift_logging/tasks/install_logging.yaml8
2 files changed, 8 insertions, 4 deletions
diff --git a/roles/openshift_logging/tasks/install_elasticsearch.yaml b/roles/openshift_logging/tasks/install_elasticsearch.yaml
index 09daa248d..d12811d56 100644
--- a/roles/openshift_logging/tasks/install_elasticsearch.yaml
+++ b/roles/openshift_logging/tasks/install_elasticsearch.yaml
@@ -23,7 +23,7 @@
es_cluster_name: "{{component}}"
deploy_name_prefix: "logging-{{component}}"
deploy_name: "{{deploy_name_prefix}}-{{'abcdefghijklmnopqrstuvwxyz0123456789'|random_word(8)}}"
- with_sequence: count={{(openshift_logging_es_cluster_size | int - openshift_logging_current_es_size | int) | abs}}
+ with_sequence: count={{ openshift_logging_current_es_size | int - openshift_logging_es_cluster_size | int }}
check_mode: no
- name: Generate Elasticsearch DeploymentConfig
@@ -90,7 +90,7 @@
deploy_name_prefix: "logging-{{component}}"
deploy_name: "{{deploy_name_prefix}}-{{'abcdefghijklmnopqrstuvwxyz0123456789'|random_word(8)}}"
cluster_size: "{{openshift_logging_es_ops_cluster_size}}"
- with_sequence: count={{ openshift_logging_es_ops_cluster_size | int - openshift_logging_current_es_ops_size | int }}
+ with_sequence: count={{ openshift_logging_current_es_ops_size | int - openshift_logging_es_ops_cluster_size | int }}
when:
- openshift_logging_use_ops
check_mode: no
diff --git a/roles/openshift_logging/tasks/install_logging.yaml b/roles/openshift_logging/tasks/install_logging.yaml
index a9699adb8..8a33498cd 100644
--- a/roles/openshift_logging/tasks/install_logging.yaml
+++ b/roles/openshift_logging/tasks/install_logging.yaml
@@ -8,8 +8,12 @@
check_mode: no
- name: Validate Elasticsearch cluster size
- fail: msg="The openshift_logging_es_cluster_size may not be scaled down more than 1 less (or 0) the number of Elasticsearch nodes already deployed"
- when: "{{openshift_logging_facts.elasticsearch.deploymentconfigs | length - openshift_logging_es_cluster_size | abs > 1}}"
+ fail: msg="The openshift_logging_es_cluster_size may only be scaled down manually. Please see official documentation on how to do this."
+ when: openshift_logging_facts.elasticsearch.deploymentconfigs | length > openshift_logging_es_cluster_size
+
+- name: Validate Elasticsearch Ops cluster size
+ fail: msg="The openshift_logging_es_ops_cluster_size may only be scaled down manually. Please see official documentation on how to do this."
+ when: openshift_logging_facts.elasticsearch_ops.deploymentconfigs | length > openshift_logging_es_ops_cluster_size
- name: Install logging
include: "{{ role_path }}/tasks/install_{{ install_component }}.yaml"