Commit Graph

29 Commits

Author SHA1 Message Date
Kir Kolyshkin 7f75aec407 [1.1] Add Go 1.23, drop 1.21
As of commit 096e6f88f0 we are ready for Go 1.23.

All that's left to do is:
 - Cirrus CI: switch from Go 1.21 to Go 1.22;
 - GHA CI: drop go 1.21, add 1.23 to test matrix;
 - Dockerfile: switch from Go 1.21.x to 1.22.x.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-08-13 15:26:40 -07:00
Kir Kolyshkin 5b89027afc [1.1] ci/cirrus: switch from CentOS to Almalinux
(This is a backport of b18d052bb83cbf0a6ad79aa1e79d5c9f75eddda7.)

Remove CentOS 7 as it is EOL.

Add back RHEL 8 clone (CentOS Stream 8 was removed by commit
40bb9c468e).

Switch from CentOS Stream 9 to Almalinux 9.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2024-07-03 10:54:30 +10:00
Kir Kolyshkin fc7af59a6b ci/cirrus: rm centos stream 8
It is past EOL and has been removed from GCE public images.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 40bb9c468e)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-06-04 23:09:46 -07:00
Kir Kolyshkin 9629fd9554 ci: workaround for centos stream 8 being EOLed
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 48c4e733f4)
Signed-off-by: lifubang <lifubang@acmcoder.com>
2024-06-04 18:21:52 +08:00
lfbzhm 82a8b979ef update go version to 1.21 in cirrus ci
Signed-off-by: lfbzhm <lifubang@acmcoder.com>
(cherry picked from commit a596a05510)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-04-02 14:12:20 -07:00
Kir Kolyshkin ac310917d5 ci/cirrus: improve host_info
1. Do not use echo, as this results in lines like this:

	...
	echo "-----"
	-----
	...

2. Move "cat /proc/cpuinfo" to be the last one, as the output is usually
   very long.

3. Add "go version" to CentOS jobs.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit fd1a79ffc8)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-08-08 18:38:38 -07:00
Kir Kolyshkin ecccc4329c [1.1] ci/cirrus: use Go 1.19.x not 1.19
[XXX 1.1 note: the above subject and the rest of the commit message
is the original description from the cherry-picked commit which talks
about 1.19 -- while in fact it is now 1.20.]

This variable is used in curl to download a go release, so we are using
the initial Go 1.19 release in Cirrus CI, not the latest Go 1.19.x
release.

From the CI perspective, it makes more sense to use the latest release.

Add some jq magic to extract the latest minor release information
from the download page, and use it.

This brings Cirrus CI jobs logic in line with all the others (GHA,
Dockerfile), where by 1.20 we actually mean "latest 1.20.x".

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 873d7bb3a3)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-08-08 18:38:38 -07:00
Kir Kolyshkin bb2401eeef [1.1] ci/cirrus: use Go 1.20
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-08-08 18:38:30 -07:00
Kir Kolyshkin d375351b79 ci/cirrus: enable rootless tests on cs9
We were not running localrootlessintegration test on CentOS Stream 9
because of some failures fixed by previous commits.

Enable rootless integration with both systemd and fs drivers.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 78d31a4941)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-28 09:42:53 -07:00
Kir Kolyshkin 7fa912ed23 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 <kolyshkin@gmail.com>
(cherry picked from commit bb4dbbc4f5)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-06 14:15:19 -07:00
Kir Kolyshkin e9c1ca081e 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 <kolyshkin@gmail.com>
(cherry picked from commit 650efb2c22)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-06 14:15:11 -07:00
Kir Kolyshkin e2265a92cd ci: bump bats 1.8.2 -> 1.9.0
As Fedora 38 uses bats 1.9.0, let's switch to this version in other
places.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 13091eeefa)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-06 14:14:59 -07:00
Kir Kolyshkin 27b86b4cc7 ci/cirrus: use vagrant from hashicorp repo
A version of vagrant available from the stock repos (2.2.19) is too old
and contains a bug that prevents downloading Fedora 38 image (see [1]).

Use packages from hashicorp repo, which currently has vagrant 2.3.4.
This resolves the problem of downloading the latest Fedora image.

Also, vagrant-libvirt plugin from Ubuntu repos is not working with
vagrant from hashicorp, so switch to using "vagrant plugin install".
The downside it, this takes extra 4 minutes or so in our CI, and I
am not sure how to cache it or speed it up.

[1] https://github.com/opencontainers/runc/pull/3835#issuecomment-1519321619

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 33b6ec2925)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-06 14:14:59 -07:00
Kir Kolyshkin 1eadcede2f ci: bump bats 1.3.0 -> 1.8.2
This version is already used by Cirrus CI Fedora 37 job, but other CI
jobs are still using 1.3.0.

Bump it everywhere so we can enjoy new version features and fixes.

For one thing, I noticed that new bats is reporting error location
correctly.

We will also be able to use "run !" and "run -N" commands.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 9dbb9f90b9)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-06 14:14:59 -07:00
Kir Kolyshkin 3531cc2d4e ci: add call to check-config.sh
This is done to make sure the script is working correctly in different
environments (distro and kernel versions). In addition, we can see in
test logs which kernel features are enabled.

Note that I didn't want to have a separate job for GHA CI, so I just
added this to the end of shellcheck one.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit cacc823724)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-04-05 10:11:22 -07:00
Kir Kolyshkin e5a5522ab6 Add supported Go releases (1.19, 1.20)
- Dockerfile: use latest Go version (1.20.x) for release binaries
- .github/workflows: add Go 1.19.x, 1.20.x
- .cirrus.yml: switch to latest Go 1.19.x

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-04-05 10:10:53 -07:00
Kir Kolyshkin 55462355d6 Require Go 1.17, bump x/sys and x/net
1. bump golang.org/x/sys to v0.6.0;
2. bump golang.org/x/net to v0.8.0
3. require Go 1.17.

Newer x/sys is needed to fix [1].

Go 1.17 is needed because x/sys/unix is using unsafe.Slice which
requires go1.17 or later.

This reuses parts of main commit a0f8847e2a.

[1] https://github.com/opencontainers/runc/issues/3715

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-04-05 09:55:25 -07:00
Kir Kolyshkin 335ec376a9 cirrus-ci: install EPEL on CentOS 7 conditionally
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit ae53cde3ff)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-10-07 10:37:47 -07:00
Kir Kolyshkin fb145a2fdf cirrus-ci: enable EPEL for CentOS 7
It used to be enabled by default, but not as of last few weeks.

While at it, add rpm -q command to make sure all required RPMS were in
fact installed (at least CentOS 7 yum exits with 0 when some packages
requested are not available).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 491713e841)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-09-28 11:08:06 -07:00
Kir Kolyshkin 036cc34899 CI/cirrus: add centos-stream-9
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit a9cc993a2b6f8405edcc2a07e52a2c48e664b323)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 11:46:11 -07:00
Kir Kolyshkin 50105de1d8 Fix failure with rw bind mount of a ro fuse
As reported in [1], in a case where read-only fuse (sshfs) mount
is used as a volume without specifying ro flag, the kernel fails
to remount it (when adding various flags such as nosuid and nodev),
returning EPERM.

Here's the relevant strace line:

> [pid 333966] mount("/tmp/bats-run-PRVfWc/runc.RbNv8g/bundle/mnt", "/proc/self/fd/7", 0xc0001e9164, MS_NOSUID|MS_NODEV|MS_REMOUNT|MS_BIND|MS_REC, NULL) = -1 EPERM (Operation not permitted)

I was not able to reproduce it with other read-only mounts as the source
(tried tmpfs, read-only bind mount, and an ext2 mount), so somehow this
might be specific to fuse.

The fix is to check whether the source has RDONLY flag, and retry the
remount with this flag added.

A test case (which was kind of hard to write) is added, and it fails
without the fix. Note that rootless user need to be able to ssh to
rootless@localhost in order to sshfs to work -- amend setup scripts
to make it work, and skip the test if the setup is not working.

[1] https://github.com/containers/podman/issues/12205

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-11-18 13:09:41 -08:00
Kir Kolyshkin 0880c001ab .cirrus.yml: silence vagrant up
This skips printing endless "Progress 0%" messages.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-11-11 19:19:57 -08:00
Sebastiaan van Stijn 12a36265c0 ci/cirrus: update to Go 1.17.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-11-05 17:17:12 +01:00
Akihiro Suda 4b25a4e82a CI: update Fedora to 35
Also rename `Vagrantfile.fedora%d` to `Vagrantfile.fedora` so that
we do not need to reset the commit log on upgrading the Fedora release.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-11-03 19:12:40 -07:00
Kir Kolyshkin f0dbefac61 .cirrus.yum: retry yum if failed
Add a sleep + retry loop in case yum install has failed.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-08-12 20:19:25 -07:00
Kir Kolyshkin 74b5c34e6e .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 <kolyshkin@gmail.com>
2021-08-12 00:10:14 -07:00
Kir Kolyshkin e06465acd4 ci/cirrus: remove unused code
Since commit 9f656dbb11 these conditions are not needed.

Fixes: 9f656dbb11
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-07-28 17:28:23 -07:00
Adrian Reber 9f656dbb11 Do not use Vagrant for CentOS 7/8
As Cirrus CI does not provide a real terminal this uses the same
'ssh -tt' workaround as the Vagrant setup. This sets up the
CentOS 7 and 8 to allow SSH as root to localhost so that we can run
all the tests via 'ssh -tt'.

Not going through vagrant reduces CI times for CentOS 7 and 8 from 6
minutes to 4 minutes.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-07-23 09:23:23 +02:00
Akihiro Suda 87bfd20fbd Evaluate Cirrus CI for Vagrant tests
ref: issue 3078

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-18 20:32:40 +09:00