From 0ecb859b969a7b9cf23582cc45ddeda15a658106 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 23 Oct 2018 11:36:52 +0100 Subject: [PATCH] test-log-collect: Disable repositories when collecting installed pkgs on SUSE zypper performs some network operations when collecting the list of installed packages which slow down the overall process. We already have the per host list of repositories so we can do some maths to figure out where each package is coming from. As we see below, disabling the repositories saves us ~9s. ~$ time zypper --quiet pa -i real 0m10.607s user 0m9.024s sys 0m0.193s ~$ time zypper --disable-repositories pa -i real 0m1.043s user 0m0.833s sys 0m0.136s On a deployment with multiple containers, the 9s difference causes a lot of overhead and jobs are timing out from time to time. As such, lets just disable the repositories when collecting the list of the installed packages. Change-Id: I3e48dad0e213f6e24a2ceb4033b1a53873b6e298 --- test-log-collect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-log-collect.sh b/test-log-collect.sh index e69f456f..dc8f9905 100755 --- a/test-log-collect.sh +++ b/test-log-collect.sh @@ -107,7 +107,7 @@ function repo_information { # SUSE package debugging elif eval sudo ${lxc_cmd} which zypper &>/dev/null; then eval sudo ${lxc_cmd} zypper lr -d > "${WORKING_DIR}/logs/suse-zypper-repolist-${1}.txt" || true - eval sudo ${lxc_cmd} zypper pa -i > "${WORKING_DIR}/logs/suse-zypper-list-installed-${1}.txt" || true + eval sudo ${lxc_cmd} zypper --disable-repositories pa -i > "${WORKING_DIR}/logs/suse-zypper-list-installed-${1}.txt" || true # Ubuntu package debugging elif eval sudo ${lxc_cmd} which apt-get &> /dev/null; then