Skip to content
Merged
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
12 changes: 10 additions & 2 deletions roles/os_must_gather/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
- _kubeconfig_stat.stat.exists
block:
- name: Run openstack-must-gather command
vars:
shell_cmd_timeout: "{{ (cifmw_os_must_gather_timeout | community.general.to_seconds) + 900 }}"
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig | default(cifmw_os_must_gather_kubeconfig) }}"
PATH: "{{ cifmw_path }}"
Expand All @@ -65,7 +67,7 @@
cifmw.general.ci_script:
output_dir: "{{ cifmw_os_must_gather_output_dir }}/artifacts"
script: >-
timeout {{ (cifmw_os_must_gather_timeout | community.general.to_seconds) + 120 }}
timeout {{ shell_cmd_timeout }}
oc adm must-gather --image {{ cifmw_os_must_gather_image }}
--timeout {{ cifmw_os_must_gather_timeout }}
--host-network={{ cifmw_os_must_gather_host_network }}
Expand All @@ -75,7 +77,13 @@
SOS_EDPM=$SOS_EDPM
SOS_DECOMPRESS=$SOS_DECOMPRESS
gather
2>&1
2>&1 || {
rc=$?
if [ $rc -eq 124 ]; then
echo "The must gather command did not finish on time!"
echo "{{ shell_cmd_timeout }} seconds was not enough to finish the task."
fi
}
- name: Find existing os-must-gather directories
ansible.builtin.find:
Expand Down