Skip to content

Commit d185c4a

Browse files
committed
post - get loki-log: revert to previous command
This change reverts to the previous command and also rename roles and avoid having the stack deploy steps done multiple times. Change-Id: Ia44cda1486860d30adbe449b507a84bf25e6cc07
1 parent 1fa3461 commit d185c4a

File tree

10 files changed

+5
-7
lines changed

10 files changed

+5
-7
lines changed

playbooks/upgrade.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
- setup-env
66
- sanity-check
77
- sfconfig-dev-prepare
8-
- setup-log-forwarding
98
- role: build-operator-assets
109
vars:
1110
build_bundle: false

roles/health-check/initialize-log-forwarding/tasks/main.yaml renamed to roles/health-check/enable-log-forward/tasks/main.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
---
2-
- name: Set up log forwarding
3-
ansible.builtin.include_role:
4-
name: setup-log-forwarding
5-
62
- name: Enable log forwarding
73
ansible.builtin.include_role:
84
name: "update-custom-resource"

roles/post/get-loki-logs/tasks/main.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@
2626
retries: 10
2727
until: "loki_buildinfo.status == 200 and '2.9.2' in loki_buildinfo.content"
2828

29+
# TODO: Remove exclusion of mariadb (this was done because of the mariadb container logs everything at high rate breaking the capability of loki to wrap logs)
30+
# Remove after the next sf-operator release (it affects only the upgrade job)
2931
- name: Get aggregated logs prefixed by service
3032
ansible.builtin.shell: >
31-
~/bin/logcli query --batch 200 --limit 1000 --tail --forward --since=6h --parallel-duration 15m --parallel-max-workers 4 --part-path-prefix=/tmp/all-query --merge-parts --no-labels --quiet '{namespace="sf"} | json | {{ line_format_query }}' > {{ _output_dir_realpath.stdout }}/all.log
33+
~/bin/logcli query --batch 2000 --forward --since=6h --parallel-duration 15m --parallel-max-workers 4 --part-path-prefix=/tmp/all-query --merge-parts --no-labels --quiet '{namespace="sf", container != "mariadb"} | json | {{ line_format_query }}' > {{ _output_dir_realpath.stdout }}/all.log
3234
3335
- name: Change owner and group for the log dir
3436
ansible.builtin.command: chown -R {{ ansible_user }}:{{ ansible_user }} {{ _output_dir_realpath.stdout }}

roles/run-tests/tasks/main.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- name: utils/manage-hosts
1414
- name: utils/get-gerrit-admin-user-api-key
1515
- name: utils/config-repo-reset
16+
- name: utils/setup-log-forwarding-stack
1617
loop_control:
1718
loop_var: role
1819

@@ -21,8 +22,8 @@
2122
name: "health-check/{{ role.name }}"
2223
when: role.when | default(true)
2324
loop:
24-
- name: initialize-log-forwarding
2525
- name: check-service-uri
26+
- name: enable-log-forward
2627
- name: scale-resources
2728
- name: zuul-connections
2829
- name: zuul-authenticators

0 commit comments

Comments
 (0)