Skip to content

Commit ae5f34c

Browse files
committed
Set timeout in each oc adm must-gather command execution
It happens that the "oc adm must-gather" command takes longer than expected, so the CI job gets timeout and the collecting logs process is disturbed. In some places, we spotted that the '--timeout' parameter in 'oc adm' command is just ignored: TASK [os_must_gather : Run openstack-must-gather command output_dir={{ cifmw_os_must_gather_output_dir }}/artifacts, script=oc adm must-gather --image {{ cifmw_os_must_gather_image }} --timeout {{ cifmw_os_must_gather_timeout }} --host-network={{ cifmw_os_must_gather_host_network }} --dest-dir {{ cifmw_os_must_gather_output_log_dir }} -- ADDITIONAL_NAMESPACES={{ cifmw_os_must_gather_additional_namespaces }} OPENSTACK_DATABASES=$OPENSTACK_DATABASES SOS_EDPM=$SOS_EDPM SOS_DECOMPRESS=$SOS_DECOMPRESS gather 2>&1] POST-RUN END RESULT_TIMED_OUT: [untrusted : playbooks/baremetal/collect-logs.yaml@main] so let's add also timeout before 'oc adm' command to make sure that it would be "killed" in proper amount of time. Signed-off-by: Daniel Pawlik <[email protected]>
1 parent fd957cc commit ae5f34c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roles/os_must_gather/tasks/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
cifmw.general.ci_script:
6666
output_dir: "{{ cifmw_os_must_gather_output_dir }}/artifacts"
6767
script: >-
68+
timeout {{ (cifmw_os_must_gather_timeout | community.general.to_seconds) + 120 }}
6869
oc adm must-gather --image {{ cifmw_os_must_gather_image }}
6970
--timeout {{ cifmw_os_must_gather_timeout }}
7071
--host-network={{ cifmw_os_must_gather_host_network }}
@@ -101,7 +102,11 @@
101102
KUBECONFIG: "{{ cifmw_openshift_kubeconfig | default(cifmw_os_must_gather_kubeconfig) }}"
102103
PATH: "{{ cifmw_path }}"
103104
ansible.builtin.command:
104-
cmd: oc adm must-gather --dest-dir {{ ansible_user_dir }}/ci-framework-data/must-gather
105+
cmd: >-
106+
timeout {{ (cifmw_os_must_gather_timeout | community.general.to_seconds) + 120 }}
107+
oc adm must-gather
108+
--dest-dir {{ ansible_user_dir }}/ci-framework-data/must-gather
109+
--timeout {{ cifmw_os_must_gather_timeout }}
105110
always:
106111
- name: Create oc_inspect log directory
107112
ansible.builtin.file:

0 commit comments

Comments
 (0)