|
32 | 32 | changed_when: false
|
33 | 33 | failed_when: container_nodes.stdout_lines|length != 0
|
34 | 34 |
|
| 35 | + |
| 36 | + # issue might be that the value is aggregated over 10m, and we only check for 2 |
35 | 37 | - name: RHELOSP-176036 Check that health status of container changed to 0
|
36 | 38 | ansible.builtin.shell:
|
37 | 39 | 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="ceph-0.redhat.local"}[10m])' | grep -oP '(?<="value":).*' | awk -F, '{ print $2 }' | grep -o '[0-9]\+' | grep 0
|
|
41 | 43 | delay: 10
|
42 | 44 | until: "output.stdout_lines | length == 1"
|
43 | 45 |
|
| 46 | +- name: NEW RHELOSP-176036 but check over a smaller time |
| 47 | + ansible.builtin.shell: |
| 48 | + 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="ceph-0.redhat.local"}[2m])' | grep -oP '(?<="value":).*' | awk -F, '{ print $2 }' | grep -o '[0-9]\+' | grep 0 |
| 49 | + register: output |
| 50 | + changed_when: false |
| 51 | + retries: 12 |
| 52 | + delay: 10 |
| 53 | + until: "output.stdout_lines | length == 1" |
| 54 | + |
| 55 | +- name: NEW RHELOSP-176036 but check over a smaller time |
| 56 | + ansible.builtin.shell: |
| 57 | + 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="ceph-0.redhat.local"}[2m])' | grep -oP '(?<="value":).*' | awk -F, '{ print $2 }' | grep -o '[0-9]\+' | grep 0 |
| 58 | + register: output |
| 59 | + changed_when: false |
| 60 | + retries: 12 |
| 61 | + delay: 10 |
| 62 | + until: "output.stdout_lines | length == 1" |
| 63 | + |
| 64 | +- name: NEW RHELOSP-176036 but wait for up to 10 minutes |
| 65 | + ansible.builtin.shell: |
| 66 | + 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="ceph-0.redhat.local"}[10m])' | grep -oP '(?<="value":).*' | awk -F, '{ print $2 }' | grep -o '[0-9]\+' | grep 0 |
| 67 | + register: output |
| 68 | + changed_when: false |
| 69 | + retries: 60 |
| 70 | + delay: 10 |
| 71 | + until: "output.stdout_lines | length == 1" |
| 72 | + |
| 73 | +- name: NEW RHELOSP-176036 but don't "grep 0" |
| 74 | + ansible.builtin.shell: |
| 75 | + 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="ceph-0.redhat.local"}[10m])' | grep -oP '(?<="value":).*' | awk -F, '{ print $2 }' | grep -o '[0-9]\+' |
| 76 | + register: output |
| 77 | + changed_when: false |
| 78 | + |
| 79 | +- name: NEW RHELOSP-176036 but skip the awk |
| 80 | + ansible.builtin.shell: |
| 81 | + 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="ceph-0.redhat.local"}[10m])' | grep -oP '(?<="value":).*' |
| 82 | + register: output |
| 83 | + changed_when: false |
| 84 | + |
| 85 | +- name: NEW RHELOSP-176036 but check the whole output |
| 86 | + ansible.builtin.shell: |
| 87 | + 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="ceph-0.redhat.local"}[10m])' |
| 88 | + register: output |
| 89 | + changed_when: false |
| 90 | + |
| 91 | + |
44 | 92 | - name: RHELOSP-176035 Start logrotate_crond container
|
45 | 93 | ansible.builtin.shell:
|
46 | 94 | cmd: |
|
|
0 commit comments