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

server: mount cgroup with rslave #4575

Merged
merged 1 commit into from Feb 15, 2021

Conversation

giuseppe
Copy link
Member

even when running as privileged container, prevent cgroup mounts to be
propagated to the host as it could cause errors when running with
rshared and systemd inside of the container.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1903553

Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com

What type of PR is this?

/kind bug

What this PR does / why we need it:

fixes https://bugzilla.redhat.com/show_bug.cgi?id=1903553

Which issue(s) this PR fixes:

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1903553

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Fix running privileged systemd containers with bidirectional mounts

even when running as privileged container, prevent cgroup mounts to be
propagated to the host as it could cause errors when running with
rshared and systemd inside of the container.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1903553

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@openshift-ci-robot openshift-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. labels Feb 15, 2021
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe

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

The pull request process is described 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 openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 15, 2021
@haircommander
Copy link
Member

LGTM

@codecov
Copy link

codecov bot commented Feb 15, 2021

Codecov Report

Merging #4575 (0778972) into master (c787156) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #4575   +/-   ##
=======================================
  Coverage   40.44%   40.44%           
=======================================
  Files         115      115           
  Lines        9385     9385           
=======================================
  Hits         3796     3796           
  Misses       5161     5161           
  Partials      428      428           

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 15, 2021

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

Test name Commit Details Rerun command
ci/prow/e2e-gcp 0778972 link /test e2e-gcp
ci/prow/e2e-agnostic 0778972 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.

@giuseppe
Copy link
Member Author

@haircommander @mrunalp PTAL

@mrunalp
Copy link
Member

mrunalp commented Feb 15, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 15, 2021
@openshift-merge-robot openshift-merge-robot merged commit 4f9a59b into cri-o:master Feb 15, 2021
@giuseppe
Copy link
Member Author

/cherry-pick release-1.19
/cherry-pick release-1.20

@openshift-cherrypick-robot

@giuseppe: #4575 failed to apply on top of branch "release-1.19":

Applying: server: mount cgroup with rslave
Using index info to reconstruct a base tree...
M	server/container_create_linux.go
Falling back to patching base and 3-way merge...
Auto-merging server/container_create_linux.go
CONFLICT (content): Merge conflict in server/container_create_linux.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 server: mount cgroup with rslave
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.19
/cherry-pick release-1.20

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.

@giuseppe
Copy link
Member Author

/cherry-pick release-1.20

@openshift-cherrypick-robot

@giuseppe: new pull request created: #4577

In response to this:

/cherry-pick release-1.20

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.

fidencio added a commit to fidencio/cri-o that referenced this pull request May 13, 2021
Let's only mount "/sys" and "/sys/fs/cgroup" as "rslave" in the case of
"OCI" containers, as cri-o#4575 broke
privileged containers when used with kata-containers.

Fixes: cri-o#4765

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
fidencio added a commit to fidencio/cri-o that referenced this pull request May 13, 2021
Let's only mount "/sys" and "/sys/fs/cgroup" as "rslave" in the case of
"OCI" containers, as cri-o#4575 broke
privileged containers when used with kata-containers.

Fixes: cri-o#4765

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants