Guillaume Coré
2019-02-06 7d2732479f3145534cf918fefa821db0a82f5853
OCP 4: more post flight check work

- Add a timeouts
- Check DNS of web console and API
2 files modified
20 ■■■■■ changed files
ansible/configs/ocp4-coreos-deployer/post_software.yml 19 ●●●● patch | view | raw | blame | history
ansible/configs/ocp4-coreos-deployer/software.yml 1 ●●●● patch | view | raw | blame | history
ansible/configs/ocp4-coreos-deployer/post_software.yml
@@ -20,6 +20,19 @@
        KUBECONFIG: cluster-{{ guid }}/auth/kubeconfig
      ignore_errors: yes
      block:
        - name: Check DNS webconsole
          command: nslookup "{{ webconsole | urlsplit('hostname') }}"
          register: checkdnswebconsole
          changed_when: false
          retries: 5
          until: checkdnswebconsole is succeeded
          delay: 30
        - name: Check DNS API
          command: nslookup "{{ showserver.stdout | trim | urlsplit('hostname') }}"
          register: checkdnsapi
          changed_when: false
        - name: Webconsole
          uri:
            url: "{{ webconsole }}"
@@ -43,12 +56,12 @@
          register: newapp
        - name: Wait for mysql
          command: oc rollout status dc/mysql -w -n postflightcheck
          command: timeout 300 oc rollout status dc/mysql -w -n postflightcheck
          register: mysqlw
          changed_when: false
        - name: Wait for php
          command: oc rollout status dc/cakephp-mysql-persistent -w -n postflightcheck
          command: timeout 300 oc rollout status dc/cakephp-mysql-persistent -w -n postflightcheck
          register: phpw
          changed_when: false
@@ -75,6 +88,8 @@
          loop:
            - "user.info: "
            - "user.info: Post Flight Check"
            - "user.info: DNS Web Console ............... {{ 'OK' if checkdnswebconsole.rc == 0 else 'FAIL' }}"
            - "user.info: DNS API ....................... {{ 'OK' if checkdnsapi.rc == 0 else 'FAIL' }}"
            - "user.info: Web console ................... {{ 'OK' if testwebconsole is succeeded else 'FAIL' }}"
            - "user.info: API ........................... {{ 'OK' if clusterinfor.rc == 0 else 'FAIL' }}"
            - "user.info: Create Project with PV ........ {{ 'OK' if newproject.rc == 0 else 'FAIL' }}"
ansible/configs/ocp4-coreos-deployer/software.yml
@@ -177,6 +177,7 @@
            KUBECONFIG: /home/{{ ansible_user }}/cluster-{{ guid }}/auth/kubeconfig
          command: oc whoami --show-server
          register: showserver
          tags: post_flight_check
        - name: Print Overview
          debug: