From 650efb2c2234dd7c85191d9e051392044dd12fae Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 22 May 2023 17:40:27 -0700 Subject: [PATCH 1/2] Fix Vagrant caching As of today, vagrant stopped working, my best guess is due to bad caching. Here's an excerpt from logs: ... vagrant plugin install vagrant-libvirt Installing the 'vagrant-libvirt' plugin. This can take a few minutes... Building native extensions. This could take a while... Installed the plugin 'vagrant-libvirt (0.12.1)'! ... uname -s ; cat Vagrantfile.$DISTRO Linux ... Downloaded 481Mb in 4.096201s. Cache hit for vagrant-8be35383dc00f23d080ff00b2a724c938d650254861f26b67624c28e3fe5e6ae! ... Vagrant failed to initialize at a very early stage: The plugins failed to initialize correctly. This may be due to manual modifications made within the Vagrant home directory. ... Error message given during initialization: Unable to resolve dependency: user requested 'vagrant-libvirt (= 0.12.0)' ... The problem is, vagrant cache overwrites newer plugin with an older one. Let's only cache the downloaded image. Also, change the cache fingerprint script (remove "Linux"). Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index bf76a6b2379..eb4ba652be3 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -47,8 +47,8 @@ task: apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev vagrant plugin install vagrant-libvirt vagrant_cache: - fingerprint_script: uname -s ; cat Vagrantfile.$DISTRO - folder: /root/.vagrant.d + fingerprint_script: cat Vagrantfile.$DISTRO + folder: /root/.vagrant.d/boxes vagrant_up_script: | ln -sf Vagrantfile.$DISTRO Vagrantfile # Retry if it fails (download.fedoraproject.org returns 404 sometimes) From bb4dbbc4f506a4565d08764ccec50e9bf4523142 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 23 May 2023 11:48:49 -0700 Subject: [PATCH 2/2] ci/cirrus: limit numcpu ... so we can run all four jobs in parallel. While at it, fix the comment in the file. Signed-off-by: Kir Kolyshkin --- .cirrus.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index eb4ba652be3..c6d238726f1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,8 @@ --- -# We use Cirrus for Vagrant tests and native CentOS 7 and 8, because macOS -# instances of GHA are too slow and flaky, and Linux instances of GHA do not -# support KVM. +# We use Cirrus for CentOS (native) and Fedora (in Vagrant), because neither +# CentOS nor Fedora is available on GHA natively, so the only option is VM. +# In GHA, nested virtualization is only supported on macOS instances, which +# are slow and flaky. # NOTE Cirrus execution environments lack a terminal, needed for # some integration tests. So we use `ssh -tt` command to fake a terminal. @@ -24,9 +25,9 @@ task: platform: linux nested_virtualization: true # CPU limit: `16 / NTASK`: see https://cirrus-ci.org/faq/#are-there-any-limits - cpu: 8 + cpu: 4 # Memory limit: `4GB * NCPU` - memory: 32G + memory: 16G host_info_script: | uname -a