From 74b5c34e6eeca83210395b5c4da49164919bcb9d Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 11 Aug 2021 23:35:26 -0700 Subject: [PATCH 1/2] .cirrus.yml: simplify GCP images description at [1] claims that: - For CentOS 8 and CentOS Stream 8, the PowerTools repository is enabled. - For CentOS 7, EPEL is enabled. Apparently, - we do not need epel for centos-stream-8; - powertools is not enabled on centos-stream-8 despite [1]. Anyway, the less yum commands the better, as we have seen those fail sometimes due to occasional networking problems etc. [1] https://cloud.google.com/compute/docs/images/os-details#centos Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1d776e3c1..8003221fb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -85,7 +85,6 @@ task: memory: 8G install_dependencies_script: | - yum install -y -q epel-release case $DISTRO in centos-7) (cd /etc/yum.repos.d && curl -O https://copr.fedorainfracloud.org/coprs/adrian/criu-el7/repo/epel-7/adrian-criu-el7-epel-7.repo) @@ -94,8 +93,7 @@ task: sysctl --system ;; centos-stream-8) - yum install -y -q dnf-plugins-core - yum config-manager --set-enabled powertools + yum config-manager --set-enabled powertools # for glibc-static ;; esac yum install -y -q gcc git iptables jq glibc-static libseccomp-devel make criu From f0dbefac61c73271d42c6d776188c98aac7e0a7a Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 12 Aug 2021 00:59:34 -0700 Subject: [PATCH 2/2] .cirrus.yum: retry yum if failed Add a sleep + retry loop in case yum install has failed. Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8003221fb..26a579cfa 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -96,7 +96,12 @@ task: yum config-manager --set-enabled powertools # for glibc-static ;; esac - yum install -y -q gcc git iptables jq glibc-static libseccomp-devel make criu + # Work around dnf mirror failures by retrying a few times. + for i in $(seq 0 2); do + sleep $i + yum install -y -q gcc git iptables jq glibc-static libseccomp-devel make criu && break + done + [ $? -eq 0 ] # fail if yum failed # install Go curl -fsSL "https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" | tar Cxz /usr/local # install bats