mirror of
https://github.com/openshift/openshift-ansible.git
synced 2026-02-05 06:46:04 +01:00
Test MCS endpoint on bootstrap to fail early if its unavailable and collect logs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user