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

kola/tests/docker: Test no-new-privileges security option #102

Merged
merged 1 commit into from
May 5, 2020

Conversation

pothos
Copy link
Member

@pothos pothos commented May 5, 2020

Extend the Docker option test with two --security-opt cases where
one currently broke in Alpha 2492.0.0. See
flatcar/Flatcar#110

How to use

$ make
$ cd bin
$ wget https://alpha.release.flatcar-linux.net/amd64-usr/2492.0.0/flatcar_production_qemu_image.img.bz2
$ (l)bunzip2 flatcar_production_qemu_image.img.bz2
$ sudo ./kola run --qemu-image flatcar_production_qemu_image.img --qemu-skip-mangle docker.base

Result for Alpha as above (WARNING can be ignored):

=== RUN   docker.base
=== RUN   docker.base/docker-info
=== RUN   docker.base/resources
=== RUN   docker.base/networks-reliably
=== RUN   docker.base/user-no-caps
--- FAIL: docker.base (221.02s)
    --- PASS: docker.base/docker-info (0.57s)
    --- FAIL: docker.base/resources (49.74s)
            cluster.go:117: WARNING: Your kernel does not support Block I/O weight or the cgroup is not mounted. Weight discarded.
            cluster.go:117: standard_init_linux.go:211: exec user process caused "operation not permitted"
            docker.go:305: [0] failed to run "docker run --rm --security-opt=no-new-privileges sleep sleep 0.2": output: "" status: "Process exited with status 1"
    --- PASS: docker.base/networks-reliably (150.68s)
    --- PASS: docker.base/user-no-caps (0.92s)
FAIL, output in _kola_temp/qemu-2020-05-05-1224-231131
harness: test suite failed

Extend the Docker option test with two --security-opt cases where
one currently broke in Alpha 2492.0.0. See
flatcar/Flatcar#110
@pothos pothos requested a review from a team May 5, 2020 10:20
Copy link
Member

@t-lo t-lo left a comment

Choose a reason for hiding this comment

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

Works as advertised (I've also checked alpha-2466.0.0, which passes the test). Thanks!

@pothos pothos merged commit 02ace62 into flatcar-master May 5, 2020
@pothos pothos deleted the kai/docker-alpha-test branch May 5, 2020 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants