summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_logging')
-rw-r--r--roles/openshift_logging/handlers/main.yml21
-rw-r--r--roles/openshift_logging/tasks/upgrade_logging.yaml6
-rw-r--r--roles/openshift_logging/templates/curator.j22
-rw-r--r--roles/openshift_logging/templates/es.j22
-rw-r--r--roles/openshift_logging/templates/kibana.j22
5 files changed, 27 insertions, 6 deletions
diff --git a/roles/openshift_logging/handlers/main.yml b/roles/openshift_logging/handlers/main.yml
index ad79e62ae..ffb812271 100644
--- a/roles/openshift_logging/handlers/main.yml
+++ b/roles/openshift_logging/handlers/main.yml
@@ -3,3 +3,24 @@
systemd: name={{ openshift.common.service_type }}-master state=restarted
when: (openshift.master.ha is not defined or not openshift.master.ha | bool) and (not (master_service_status_changed | default(false) | bool))
notify: Verify API Server
+
+- name: Verify API Server
+ # Using curl here since the uri module requires python-httplib2 and
+ # wait_for port doesn't provide health information.
+ command: >
+ curl --silent --tlsv1.2
+ {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
+ --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
+ {% else %}
+ --cacert {{ openshift.common.config_base }}/master/ca.crt
+ {% endif %}
+ {{ openshift.master.api_url }}/healthz/ready
+ args:
+ # Disables the following warning:
+ # Consider using get_url or uri module rather than running curl
+ warn: no
+ register: api_available_output
+ until: api_available_output.stdout == 'ok'
+ retries: 120
+ delay: 1
+ changed_when: false
diff --git a/roles/openshift_logging/tasks/upgrade_logging.yaml b/roles/openshift_logging/tasks/upgrade_logging.yaml
index 0421cdf58..83867d361 100644
--- a/roles/openshift_logging/tasks/upgrade_logging.yaml
+++ b/roles/openshift_logging/tasks/upgrade_logging.yaml
@@ -26,14 +26,14 @@
loop_control:
loop_var: object
-- name: Wait for pods to stop
+- name: Wait for pods to start
oc_obj:
state: list
- kind: dc
+ kind: pods
selector: "component=es"
namespace: "{{openshift_logging_namespace}}"
register: running_pod
- until: running_pod.results.results.items[?(@.status.phase == "Running")].metadata.name != ''
+ until: running_pod.results.results[0]['items'] | selectattr('status.phase', 'equalto', 'Running') | map(attribute='metadata.name') | list | length != 0
retries: 30
delay: 10
diff --git a/roles/openshift_logging/templates/curator.j2 b/roles/openshift_logging/templates/curator.j2
index b7bc15b62..55f4976ec 100644
--- a/roles/openshift_logging/templates/curator.j2
+++ b/roles/openshift_logging/templates/curator.j2
@@ -31,7 +31,7 @@ spec:
{% if curator_node_selector is iterable and curator_node_selector | length > 0 %}
nodeSelector:
{% for key, value in curator_node_selector.iteritems() %}
- {{key}}: {{value}}
+ {{key}}: "{{value}}"
{% endfor %}
{% endif %}
containers:
diff --git a/roles/openshift_logging/templates/es.j2 b/roles/openshift_logging/templates/es.j2
index ec84c6b76..81ae070be 100644
--- a/roles/openshift_logging/templates/es.j2
+++ b/roles/openshift_logging/templates/es.j2
@@ -33,7 +33,7 @@ spec:
{% if es_node_selector is iterable and es_node_selector | length > 0 %}
nodeSelector:
{% for key, value in es_node_selector.iteritems() %}
- {{key}}: {{value}}
+ {{key}}: "{{value}}"
{% endfor %}
{% endif %}
containers:
diff --git a/roles/openshift_logging/templates/kibana.j2 b/roles/openshift_logging/templates/kibana.j2
index be9b45ab4..e6ecf82ff 100644
--- a/roles/openshift_logging/templates/kibana.j2
+++ b/roles/openshift_logging/templates/kibana.j2
@@ -30,7 +30,7 @@ spec:
{% if kibana_node_selector is iterable and kibana_node_selector | length > 0 %}
nodeSelector:
{% for key, value in kibana_node_selector.iteritems() %}
- {{key}}: {{value}}
+ {{key}}: "{{value}}"
{% endfor %}
{% endif %}
containers: