Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions roles/artifacts/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
ansible.builtin.import_role:
name: os_must_gather

- name: Run must gather - OpenShift cluster state
when: cifmw_artifacts_gather_logs
ignore_errors: true # noqa: ignore-errors
ansible.builtin.import_role:
name: os_must_gather
tasks_from: os_cluster_info.yml

- name: Collect crc logs when tests failed
ignore_errors: true # noqa: ignore-errors
when: not cifmw_success_flag.stat.exists
Expand Down
4 changes: 0 additions & 4 deletions roles/os_must_gather/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@
dest: "{{ cifmw_os_must_gather_output_log_dir }}/latest"
state: link

# Collect pod usage
- name: Collect pod usage
ansible.builtin.include_tasks: get_top.yml

rescue:
- name: Openstack-must-gather failure
block:
Expand Down
27 changes: 27 additions & 0 deletions roles/os_must_gather/tasks/oomkill.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# Copyright Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
- name: Check if there were some OOMKill
ansible.builtin.shell: >
oc get events
--all-namespaces
--field-selector type=Warning
--sort-by=.lastTimestamp |
grep -i -E 'OOMKill|Killing.*out of memory|Pressure' >
{{ cifmw_os_must_gather_output_log_dir }}/latest/OOMKill-events.log
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig | default(cifmw_os_cluster_info_kubeconfig) }}"
ignore_errors: true # noqa: ignore-errors
6 changes: 6 additions & 0 deletions roles/os_must_gather/tasks/os_cluster_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Collect pod usage
ansible.builtin.include_tasks: get_top.yml

- name: Collect info for OOMKill
ansible.builtin.include_tasks: oomkill.yml
Loading