Add 2 minute timeout for repoquery
We encountered an issue when repoquery took several minutes which has lead to timeouts and unfinished log collections. To avoid that this commit adds a timeout which is basically a fail-safe from collect_logs point of view. The patch replaces for loop for record_available_packages command by a single command. Change-Id: Ie3007414aac14db47696fca62b07e1efa4e1de16
This commit is contained in:
parent
354650bcbb
commit
1e37a62f64
|
@ -219,10 +219,11 @@ artcl_commands:
|
||||||
cmd: "{{ ansible_pkg_mgr }} module list --enabled"
|
cmd: "{{ ansible_pkg_mgr }} module list --enabled"
|
||||||
when: ansible_distribution_major_version|int >= 8
|
when: ansible_distribution_major_version|int >= 8
|
||||||
record_available_packages:
|
record_available_packages:
|
||||||
|
# the timeout is like a fail-safe from collect_logs point of view,
|
||||||
|
# we encountered an issue when repolist query took several minutes
|
||||||
|
# which lead to timeouts and unfinished log collections
|
||||||
cmd: |
|
cmd: |
|
||||||
for i in `{{ ansible_pkg_mgr }} repolist enabled -v | grep Repo-id | awk '{print $3}' | awk -F / '{print $1}'`;do
|
timeout 120 repoquery -a --qf "%{ui_from_repo} %{name}" | sort
|
||||||
repoquery --repoid $i -a
|
|
||||||
done
|
|
||||||
capture_file: /var/log/extra/all_available_packages.txt
|
capture_file: /var/log/extra/all_available_packages.txt
|
||||||
selinux:
|
selinux:
|
||||||
cmd: |
|
cmd: |
|
||||||
|
|
Loading…
Reference in New Issue