Skip to content

Commit a3c2da6

Browse files
authored
[test_sensubility] Fixing RHELOSP-176036 and RHELOSP-176038 (#173)
1 parent a87df60 commit a3c2da6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

roles/test_sensubility/tasks/test_health_status.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@
3737
changed_when: false
3838
failed_when: container_nodes.stdout_lines|length != 0
3939

40-
40+
- name: "Wait 1 minute before checking that health status of container has been changed"
41+
ansible.builtin.pause:
42+
minutes: 1
4143

4244
- name: RHELOSP-176036
4345
# Description: Check that health status of container changed to 0
4446
ansible.builtin.shell:
45-
cmd: /usr/bin/curl -k {{ prom_auth_string }} -g https://{{ prom_url }}/api/v1/query? --data-urlencode 'query=last_over_time(sensubility_container_health_status{process="logrotate_crond",host="{{ groups['overcloud_nodes'][0] }}"}[10m])' | grep -oP '(?<="value":).*' | awk -F, '{ print $2 }' | grep -o '[0-9]\+' | grep 0 | wc -l
47+
cmd: /usr/bin/curl -k {{ prom_auth_string }} -g https://{{ prom_url }}/api/v1/query? --data-urlencode 'query=last_over_time(sensubility_container_health_status{process="logrotate_crond",host="controller-0.redhat.local"}[10m])' | grep -oP '(?<="value":).*' | awk -F, '{ print $2 }' | grep -o '[0-9]\+' | grep 0 | wc -l
4648
# /usr/bin/curl -k {{ prom_auth_string }} \
4749
# -g https://{{ prom_url }}/api/v1/query? \
4850
# --data-urlencode 'query=last_over_time(sensubility_container_health_status{process="logrotate_crond",host="{{ groups['overcloud_nodes'][0] }}"}[10m])' \
@@ -64,14 +66,18 @@
6466
changed_when: false
6567

6668

69+
- name: "Wait 1 minute before checking that health status of container has been changed"
70+
ansible.builtin.pause:
71+
minutes: 1
72+
6773

6874
- name: RHELOSP-176038
6975
# Description: Check that health status of container changed to 1
7076
ansible.builtin.shell:
7177
cmd: >-
7278
/usr/bin/curl -k {{ prom_auth_string }} \
7379
-g https://{{ prom_url }}/api/v1/query? \
74-
--data-urlencode 'query=last_over_time(sensubility_container_health_status{process="logrotate_crond",host="{{ groups['overcloud_nodes'][0] }}"}[10m])' \
80+
--data-urlencode 'query=last_over_time(sensubility_container_health_status{process="logrotate_crond",host="controller-0.redhat.local"}[10m])' \
7581
| grep -oP '(?<="value":).*' | awk -F, '{ print $2 }' | grep -o '[0-9]\+' | grep 1 | wc -l
7682
register: output
7783
changed_when: false

0 commit comments

Comments
 (0)