Merge pull request #3878 from kolyshkin/1.1-bump-vagrant

[1.1] bump Fedora, Vagrant, bats
This commit is contained in:
Kir Kolyshkin
2023-06-07 11:26:07 -07:00
committed by GitHub
7 changed files with 25 additions and 22 deletions
+16 -9
View File
@@ -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
@@ -37,12 +38,18 @@ task:
echo "-----"
df -T
install_libvirt_vagrant_script: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
apt-get update
apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt
apt-get install -y libvirt-daemon libvirt-daemon-system vagrant
systemctl enable --now libvirtd
apt-get build-dep -y vagrant ruby-libvirt
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)
@@ -71,7 +78,7 @@ task:
HOME: /root
CIRRUS_WORKING_DIR: /home/runc
GO_VERSION: "1.19.8"
BATS_VERSION: "v1.3.0"
BATS_VERSION: "v1.9.0"
RPMS: gcc git iptables jq glibc-static libseccomp-devel make criu fuse-sshfs
# yamllint disable rule:key-duplicates
matrix:
+1 -1
View File
@@ -70,7 +70,7 @@ jobs:
- name: install bats
uses: mig4/setup-bats@v1
with:
bats-version: 1.3.0
bats-version: 1.9.0
- name: unit test
if: matrix.rootless != 'rootless'
+1 -1
View File
@@ -1,5 +1,5 @@
ARG GO_VERSION=1.20
ARG BATS_VERSION=v1.3.0
ARG BATS_VERSION=v1.9.0
ARG LIBSECCOMP_VERSION=2.5.4
FROM golang:${GO_VERSION}-bullseye
+1 -1
View File
@@ -3,7 +3,7 @@
Vagrant.configure("2") do |config|
# Fedora box is used for testing cgroup v2 support
config.vm.box = "fedora/37-cloud-base"
config.vm.box = "fedora/38-cloud-base"
config.vm.provider :virtualbox do |v|
v.memory = 2048
v.cpus = 2
+2 -2
View File
@@ -344,7 +344,7 @@ function simple_cr() {
runc checkpoint --work-path ./work-dir test_busybox
grep -B 5 Error ./work-dir/dump.log || true
[ "$status" -eq 0 ]
! test -f ./work-dir/"$tmplog1"
run ! test -f ./work-dir/"$tmplog1"
test -f ./work-dir/"$tmplog2"
# after checkpoint busybox is no longer running
@@ -355,7 +355,7 @@ function simple_cr() {
runc restore -d --work-path ./work-dir --console-socket "$CONSOLE_SOCKET" test_busybox
grep -B 5 Error ./work-dir/restore.log || true
[ "$status" -eq 0 ]
! test -f ./work-dir/"$tmplog1"
run ! test -f ./work-dir/"$tmplog1"
test -f ./work-dir/"$tmplog2"
# busybox should be back up and running
+2 -2
View File
@@ -235,12 +235,12 @@ function check_exec_debug() {
# Check we can join top-level cgroup (implicit).
runc exec test_busybox cat /proc/self/cgroup
[ "$status" -eq 0 ]
! grep -v ":$REL_CGROUPS_PATH\$" <<<"$output"
run ! grep -v ":$REL_CGROUPS_PATH\$" <<<"$output"
# Check we can join top-level cgroup (explicit).
runc exec --cgroup / test_busybox cat /proc/self/cgroup
[ "$status" -eq 0 ]
! grep -v ":$REL_CGROUPS_PATH\$" <<<"$output"
run ! grep -v ":$REL_CGROUPS_PATH\$" <<<"$output"
# Create a few subcgroups.
# Note that cpu,cpuacct may be mounted together or separate.
+2 -6
View File
@@ -1,10 +1,6 @@
#!/bin/bash
# bats-core v1.2.1 defines BATS_RUN_TMPDIR
if [ -z "$BATS_RUN_TMPDIR" ]; then
echo "bats >= v1.2.1 is required. Aborting." >&2
exit 1
fi
bats_require_minimum_version 1.5.0
# Root directory of integration tests.
INTEGRATION_ROOT=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
@@ -347,7 +343,7 @@ function have_criu() {
# Workaround for https://github.com/opencontainers/runc/issues/3532.
local ver
ver=$(rpm -q criu 2>/dev/null || true)
! grep -q '^criu-3\.17-[123]\.el9' <<<"$ver"
run ! grep -q '^criu-3\.17-[123]\.el9' <<<"$ver"
}
# Allows a test to specify what things it requires. If the environment can't