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

seccomp: change empty profile behavior #3342

Closed
wants to merge 1 commit into from

Conversation

benclarkwood
Copy link

If seccomp is enabled, but the profile is empty, fall back to the default seccomp profile rather than unconfined.

Fix for #3079

If seccomp is enabled, but the profile is empty, fall back to the default seccomp profile rather than unconfined.

Signed-off-by: Ben Wood <ben@benclarkwood.com>
@openshift-ci-robot openshift-ci-robot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Mar 2, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: benclarkwood
To complete the pull request process, please assign saschagrunert
You can assign the PR to them by writing /assign @saschagrunert in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link

Hi @benclarkwood. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

1 similar comment
@openshift-ci-robot
Copy link

Hi @benclarkwood. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 2, 2020
@codecov
Copy link

codecov bot commented Mar 2, 2020

Codecov Report

Merging #3342 (62eaf6c) into master (5996f36) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #3342   +/-   ##
=======================================
  Coverage   44.53%   44.53%           
=======================================
  Files          94       94           
  Lines        7731     7731           
=======================================
  Hits         3443     3443           
  Misses       3977     3977           
  Partials      311      311           

@haircommander
Copy link
Member

/ok-to-test

Thanks for the PR! I'm unsure this works with the CRI definition but let's see 😄

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 2, 2020
@saschagrunert
Copy link
Member

/ok-to-test

Thanks for the PR! I'm unsure this works with the CRI definition but let's see

Do you have any resource that the CRI should behave like this?

if s.Config().Seccomp().IsDisabled() {
if profile == "" {
Copy link
Member

Choose a reason for hiding this comment

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

The test in ctr_seccomp.bats is now failing as well, I think we have to change it too.

Copy link
Member

Choose a reason for hiding this comment

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

server/container_create.go Show resolved Hide resolved
@rhatdan
Copy link
Contributor

rhatdan commented Mar 7, 2020

/retest

@rhatdan
Copy link
Contributor

rhatdan commented Mar 22, 2020

@benclarkwood I think this might need a rebase.

@JAORMX
Copy link

JAORMX commented Apr 9, 2020

Would be great to get this fixed.

@JAORMX
Copy link

JAORMX commented Apr 9, 2020

@benclarkwood will you have time to get back to this? Or do you want help in fixing up the tests?

@haircommander
Copy link
Member

based on the results of both critest runs:

/go/src/github.com/kubernetes-sigs/cri-tools/pkg/validate/security_context_linux.go:608 Expected     <string>: Seccomp:	2      to contain substring     <string>: 0 /go/src/github.com/kubernetes-sigs/cri-tools/pkg/validate/security_context_linux.go:1120

it seems this is in violation of the cri. I'm not sure we can do anything here without having the cri changed

@JAORMX
Copy link

JAORMX commented Apr 10, 2020

Would this enhancement help change the CRI default? kubernetes/enhancements#1148

@haircommander
Copy link
Member

Would this enhancement help change the CRI default? kubernetes/enhancements#1148

it seems to be the first step. the proposal would only declare it GA and make it a first class pod spec value. Further work and proposals would be needed to have the CRI default to a profile when none is specified

@openshift-ci-robot
Copy link

@benclarkwood: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/openshift-jenkins/critest_fedora 62eaf6c link /test critest_fedora
ci/openshift-jenkins/integration_fedora 62eaf6c link /test integration_fedora
ci/openshift-jenkins/integration_crun 62eaf6c link /test integration_crun
ci/openshift-jenkins/critest_rhel 62eaf6c link /test critest_rhel
ci/openshift-jenkins/integration_crun_cgroupv2 62eaf6c link /test integration_cgroupv2
ci/openshift-jenkins/integration_rhel 62eaf6c link /test integration_rhel
ci/prow/images 62eaf6c link /test images
ci/prow/launch-aws 62eaf6c link /test launch-aws
ci/prow/e2e-aws 62eaf6c link /test e2e-aws

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot
Copy link
Contributor

@benclarkwood: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-agnostic 62eaf6c link /test e2e-agnostic

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@haircommander
Copy link
Member

closing this, as we have #4212 now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants