1
0
mirror of https://github.com/openshift/openshift-ansible.git synced 2026-02-05 15:45:57 +01:00

Test MCS endpoint on bootstrap to fail early if its unavailable and collect logs

This commit is contained in:
Vadim Rutkovsky
2018-12-14 10:02:20 +01:00
parent c4f28fab9c
commit c0ede0d3d1

View File

@@ -38,6 +38,27 @@
vars:
excluded_services:
- progress.service
- name: Wait for MCS endpoint to show up
uri:
url: "{{ mcd_endpoint }}/config/master"
validate_certs: false
delay: 10
retries: 60
register: mcs
until:
- "'status' in mcs"
- mcs.status == 200
ignore_errors: true
- when: mcs is failed
block:
- name: Get node logs
command: journalctl --no-pager -u bootkube
register: bootkube_logs
ignore_errors: true
- debug:
msg: "{{ bootkube_logs.stdout_lines }}"
- fail:
msg: MCS start failed.
- name: Start masters
hosts: masters