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.0] fix ci #3282

Merged
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Nov 15, 2021

TL;DR: backports of #3112 and #3069 to release-1.0 branch to fix CI broken by upstream updates.

1. libct/int/checkpoint_test: fix ParentImage

The ParentImage set by the test should be a path relative to
ImagesDirectory, pointing to a parent images directory (created
by pre-dump).

The parent directory is created by TempDir and so its name is not
constant but has a variable suffix. So, the config was pointing to
a non-existent directory.

This left unnoticed by criu as it assumed the parent image does not
exist, and performed a full dump.

Since criu PR checkpoint-restore/criu#1403 (will be a part of criu 3.16) that is no longer the
case -- the invalid parent path is treated as an error, and so our
test fails like this:

== RUN   TestCheckpoint
    checkpoint_test.go:145: === /tmp/criu070876105/dump.log ===
    checkpoint_test.go:145: open /tmp/criu070876105/dump.log: no such file or directory
    checkpoint_test.go:146: criu failed: type DUMP errno 56
        log file: /tmp/criu070876105/dump.log
--- FAIL: TestCheckpoint (0.26s)

Fix this by using the actual name of the parent image dir.

This fixes release-1.0 CI against criu 3.16.

Fixes: 98f0041
Fixes: #3278

NOTE

2. tests/int/dev: add CAP_SYSLOG to /dev/kmsg tests

Add CAP_SYSLOG to ensure that /dev/kmsg can be accesses on systems where
the sysctl kernel.dmesg_restrict = 1.

(This is a backport of #3069 to release-1.0)

The ParentImage set by the test should be a path relative to
ImagesDirectory, pointing to a parent images directory (created
by pre-dump).

The parent directory is created by TempDir and so its name is not
constant but has a variable suffix. So, the config was pointing to
a non-existent directory.

This left unnoticed by criu as it assumed the parent image does not
exist, and performed a full dump.

Since criu PR 1403 (will be a part of criu 3.16) that is no longer the
case -- the invalid parent path is treated as an error, and so our
test fails like this:

== RUN   TestCheckpoint
    checkpoint_test.go:145: === /tmp/criu070876105/dump.log ===
    checkpoint_test.go:145: open /tmp/criu070876105/dump.log: no such file or directory
    checkpoint_test.go:146: criu failed: type DUMP errno 56
        log file: /tmp/criu070876105/dump.log
--- FAIL: TestCheckpoint (0.26s)

Fix this by using the actual name of the parent image dir.

Fixes: 98f0041
Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Contributor Author

not ok 41 runc run [device cgroup allow rw char device]
# (in test file tests/integration/dev.bats, line 87)
#   `[ "$status" -eq 0 ]' failed
# runc spec (status=0):
# 
# runc run -d --console-socket /tmp/bats-run-15350/runc.61S5q1/tty/sock test_allow_char (status=0):
# 
# runc exec test_allow_char sh -c hostname | tee /dev/kmsg (status=0):
# myhostname
# runc exec test_allow_char sh -c head -n 1 /dev/kmsg (status=1):
# head: /dev/kmsg: Operation not permitted

This needs #3069 backported. Will add.

@kolyshkin kolyshkin changed the title [1.0] fix ci for criu 3.16 [1.0] fix ci Nov 15, 2021
Add CAP_SYSLOG to ensure that /dev/kmsg can be accesses on systems where
the sysctl kernel.dmesg_restrict = 1.

Signed-off-by: Odin Ugedal <[email protected]>
(cherry picked from commit 6be088d)
Signed-off-by: Kir Kolyshkin <[email protected]>
@kolyshkin
Copy link
Contributor Author

OK, now I know why we need periodical (rather than per-PR) CI jobs. Will add.

@kolyshkin
Copy link
Contributor Author

@AkihiroSuda @thaJeztah PTAL

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 3125814 into opencontainers:release-1.0 Nov 16, 2021
@kolyshkin kolyshkin linked an issue Nov 18, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

runc 1.0.x fails with criu 3.16
4 participants