Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.1] CI fixes #3538

Merged
merged 4 commits into from
Jul 28, 2022
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Jul 26, 2022

  1. Backport tests/int: runc delete: fix flake, enable for rootless #3392 aka 728571c
  2. Fix CI failure due to some GHA changes related to cgroups.
  3. Partial backport of 6e1d476 (tests/int changes only).
  4. Backport CI: workaround CentOS Stream 9 criu issue #3539.

See individual commits for details.

The following failure was observed in CI (on centos-stream-8 in
integration-cgroup suite):

	not ok 42 runc delete
	 (from function `fail' in file tests/integration/helpers.bash, line 338,
	  in test file tests/integration/delete.bats, line 30)
	   `[ "$output" = "" ] || fail "cgroup not cleaned up correctly: $output"' failed
	....
	cgroup not cleaned up correctly: /sys/fs/cgroup/pids/system.slice/tmp-bats\x2drun\x2d68012-runc.IPOypI-state-testbusyboxdelete-runc.zriC8C.mount
	/sys/fs/cgroup/cpu,cpuacct/system.slice/tmp-bats\x2drun\x2d68012-runc.IPOypI-state-testbusyboxdelete-runc.zriC8C.mount
	...

Apparently, this is a cgroup systemd creates for a mount unit which
appears then runc does internal /proc/self/exe bind-mount. The test
case should not take it into account.

The second problem with this test is it does not check that cgroup
actually exists when the container is running (so checking that it
was removed after makes less sense). For example, in rootless mode
the cgroup might not have been created.

Fix the find arguments to look for a specific cgroup name, and add
a check that these arguments are correct (i.e. the cgroup is found
when the container is running).

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 728571c)
Signed-off-by: Kir Kolyshkin <[email protected]>
A couple of test cases in delete.bats check that a particular cgroup
exists (or doesn't exist) using find. This is now resulting in errors
like these:

        find: ‘/sys/fs/cgroup/blkio/azsec’: Permission denied
        find: ‘/sys/fs/cgroup/blkio/azsec_clamav’: Permission denied
        find: ‘/sys/fs/cgroup/cpu,cpuacct/azsec’: Permission denied
        find: ‘/sys/fs/cgroup/cpu,cpuacct/azsec_clamav’: Permission denied
        find: ‘/sys/fs/cgroup/memory/azsec’: Permission denied
        find: ‘/sys/fs/cgroup/memory/azsec_clamav’: Permission denied

leading to test case failures.

Apparently, GHA runs something else on a test box, so we get this.

To fix, ignore non-zero exit code from find, and redirect its stderr
to /dev/null.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin changed the base branch from main to release-1.1 July 26, 2022 20:19
@kolyshkin
Copy link
Contributor Author

close/reopen to kick ci

@kolyshkin kolyshkin closed this Jul 27, 2022
@kolyshkin kolyshkin reopened this Jul 27, 2022
@kolyshkin kolyshkin added this to the 1.1.4 milestone Jul 27, 2022
@kolyshkin kolyshkin marked this pull request as ready for review July 27, 2022 22:02
@kolyshkin kolyshkin changed the title [1.1] fix ci vs azsec [1.1] CI fixes Jul 27, 2022
@kolyshkin kolyshkin marked this pull request as draft July 28, 2022 00:52
This is a partial backport of commit 6e1d476 from main branch.

Instead of specifying path to criu binary, use whatever is found in
$PATH.

Signed-off-by: Kir Kolyshkin <[email protected]>
Older criu builds fail to work properly on CentOS Stream 9 due to
changes in glibc's rseq.

Skip criu tests if an older criu version is found.

Fixes: opencontainers#3532

Cherry picked from commit 4fd4af5.

Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin kolyshkin marked this pull request as ready for review July 28, 2022 02:36
Copy link
Member

@cyphar cyphar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyphar cyphar merged commit f4aaf0d into opencontainers:release-1.1 Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants