Skip to content

Commit

Permalink
Merge "post - get loki-log: revert to previous command"
Browse files Browse the repository at this point in the history
  • Loading branch information
Microzuul CI authored and Gerrit Code Review committed Jun 17, 2024
2 parents 3180dfa + d185c4a commit b0ce2e1
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion playbooks/upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- setup-env
- sanity-check
- sfconfig-dev-prepare
- setup-log-forwarding
- role: build-operator-assets
vars:
build_bundle: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
- name: Set up log forwarding
ansible.builtin.include_role:
name: setup-log-forwarding

- name: Enable log forwarding
ansible.builtin.include_role:
name: "update-custom-resource"
Expand Down
4 changes: 3 additions & 1 deletion roles/post/get-loki-logs/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
retries: 10
until: "loki_buildinfo.status == 200 and '2.9.2' in loki_buildinfo.content"

# 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)
# Remove after the next sf-operator release (it affects only the upgrade job)
- name: Get aggregated logs prefixed by service
ansible.builtin.shell: >
~/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
~/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
- name: Change owner and group for the log dir
ansible.builtin.command: chown -R {{ ansible_user }}:{{ ansible_user }} {{ _output_dir_realpath.stdout }}
3 changes: 2 additions & 1 deletion roles/run-tests/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- name: utils/manage-hosts
- name: utils/get-gerrit-admin-user-api-key
- name: utils/config-repo-reset
- name: utils/setup-log-forwarding-stack
loop_control:
loop_var: role

Expand All @@ -21,8 +22,8 @@
name: "health-check/{{ role.name }}"
when: role.when | default(true)
loop:
- name: initialize-log-forwarding
- name: check-service-uri
- name: enable-log-forward
- name: scale-resources
- name: zuul-connections
- name: zuul-authenticators
Expand Down
File renamed without changes.

0 comments on commit b0ce2e1

Please sign in to comment.