From d1e812640cb0f99ae198d201896d20a9c94243d8 Mon Sep 17 00:00:00 2001 From: "Gael Chamoulaud (Strider)" Date: Fri, 24 Jan 2020 10:30:02 +0100 Subject: [PATCH] Delete healthcheck-service-status role THT is calling this role as an inflight validation. So to get rid of a chicken-and-egg problem between tht and validations, this role has been kept until THT and tripleo-validations changes get merged. If you read this message, it's time to erase it! Change-Id: I4fea9095f02b6e71caf5c61125579413f5663523 Signed-off-by: Gael Chamoulaud (Strider) (cherry picked from commit f325b4a38c1ea1ba6ddc1d0ac8a1d42975cdaff2) --- .../defaults/main.yml | 8 ----- .../healthcheck-service-status/tasks/main.yml | 34 ------------------- .../healthcheck-service-status/vars/main.yml | 7 ---- 3 files changed, 49 deletions(-) delete mode 100644 roles/healthcheck-service-status/defaults/main.yml delete mode 100644 roles/healthcheck-service-status/tasks/main.yml delete mode 100644 roles/healthcheck-service-status/vars/main.yml diff --git a/roles/healthcheck-service-status/defaults/main.yml b/roles/healthcheck-service-status/defaults/main.yml deleted file mode 100644 index 8c829ad4f..000000000 --- a/roles/healthcheck-service-status/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# The default values for the two following variables are set up to wait up to -# 300s for the first healthcheck to run. -retries_number: 10 -delay_number: 30 -# Please use inflight_healtcheck_services when using this role through the -# inflight validations. -inflight_healthcheck_services: [] diff --git a/roles/healthcheck-service-status/tasks/main.yml b/roles/healthcheck-service-status/tasks/main.yml deleted file mode 100644 index 2ee55205f..000000000 --- a/roles/healthcheck-service-status/tasks/main.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -- name: Get the healthcheck services list enabled on node - shell: > - systemctl list-unit-files | grep "^tripleo.*healthcheck.*enabled" | awk -F'.' '{print $1}' - changed_when: false - register: healthcheck_services_list - when: inflight_healthcheck_services | length < 1 - -- name: Set hc_services - set_fact: - hc_services: > - {%- if inflight_healthcheck_services | length > 0 -%} - {{ inflight_healthcheck_services }} - {%- else -%} - {{ healthcheck_services_list.stdout_lines }} - {%- endif -%} - -- name: Get systemd healthcheck service status - systemd: - name: "{{ item }}" - retries: "{{ retries_number|int }}" - delay: "{{ delay_number|int }}" - until: - - systemd_healthcheck_state.status.ExecMainPID != '0' - - systemd_healthcheck_state.status.ActiveState in ['inactive', 'failed'] - ignore_errors: true - register: systemd_healthcheck_state - with_items: "{{ hc_services }}" - -- name: Fail if systemd healthcheck services are in failed status - fail: - msg: "Failed systemd healthcheck service detected: {{ item.item }}" - when: item.status.ExecMainStatus != '0' - loop: "{{ systemd_healthcheck_state.results }}" diff --git a/roles/healthcheck-service-status/vars/main.yml b/roles/healthcheck-service-status/vars/main.yml deleted file mode 100644 index a3c7f80ec..000000000 --- a/roles/healthcheck-service-status/vars/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -metadata: - name: Healthcheck systemd services Check - description: > - Check for failed healthcheck systemd services. - groups: - - post-deployment