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

OCPBUGS-27145: Reduce container privileges #396

Merged
merged 2 commits into from Feb 1, 2024

Conversation

zaneb
Copy link
Member

@zaneb zaneb commented Jan 15, 2024

Many of the containers we run have to be run in privileged mode in order to access a host volume - not only so they can write files as root, but also to get an SELinux context that allows it.

However, some containers currently running as privileged do not require this.

@zaneb zaneb mentioned this pull request Jan 15, 2024
@openshift-ci openshift-ci bot requested review from honza and sadasu January 15, 2024 00:28
Copy link
Contributor

openshift-ci bot commented Jan 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zaneb

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 15, 2024
@zaneb
Copy link
Member Author

zaneb commented Jan 15, 2024

Tests are failing because the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1908302 in metal3-static-ip-manager - toggling the addr_gen mode - requires extra capabilities.

@zaneb
Copy link
Member Author

zaneb commented Jan 15, 2024

/rename OCPBUGS-27145: Reduce container privileges

@zaneb zaneb changed the title Reduce container privilege OCPBUGS-27145: Reduce container privileges Jan 15, 2024
@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 15, 2024
@openshift-ci-robot
Copy link
Contributor

@zaneb: This pull request references Jira Issue OCPBUGS-27145, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Many of the containers we run have to be run in privileged mode in order to access a host volume - not only so they can write files as root, but also to get an SELinux context that allows it.

However, some containers currently running as privileged do not require this.

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 openshift-eng/jira-lifecycle-plugin repository.

@zaneb
Copy link
Member Author

zaneb commented Jan 15, 2024

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jan 15, 2024
@openshift-ci-robot
Copy link
Contributor

@zaneb: This pull request references Jira Issue OCPBUGS-27145, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (jhajyahy@redhat.com), skipping review request.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

Many of the containers we run have to be run in privileged mode in order
to access a hostPath volume - not only so they can write files as root,
but also to get an SELinux context that allows it.

However, some containers currently running as privileged do not require
this. Disabled privileged mode and add only the required capabilities
for these containers.
@zaneb
Copy link
Member Author

zaneb commented Jan 16, 2024

/retest

@zaneb
Copy link
Member Author

zaneb commented Jan 17, 2024

Metal upgrade jobs were permafailing prior to this by the looks of it.

@zaneb
Copy link
Member Author

zaneb commented Jan 18, 2024

/cc @dtantsur

@openshift-ci openshift-ci bot requested a review from dtantsur January 18, 2024 02:39
@derekhiggins
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 30, 2024
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 7fa363a and 2 for PR HEAD 5ad7dbb in total

Copy link
Contributor

openshift-ci bot commented Jan 31, 2024

@zaneb: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-ipi-sdn-upgrade 5ad7dbb link false /test e2e-metal-ipi-sdn-upgrade
ci/prow/e2e-metal-ipi-upgrade-ovn-ipv6 5ad7dbb link false /test e2e-metal-ipi-upgrade-ovn-ipv6

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.

@derekhiggins
Copy link
Contributor

/test e2e-metal-ipi-sdn-serial-ipv4

@openshift-merge-bot openshift-merge-bot bot merged commit 345b62a into openshift:master Feb 1, 2024
15 of 17 checks passed
@openshift-ci-robot
Copy link
Contributor

@zaneb: Jira Issue OCPBUGS-27145: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-27145 has been moved to the MODIFIED state.

In response to this:

Many of the containers we run have to be run in privileged mode in order to access a host volume - not only so they can write files as root, but also to get an SELinux context that allows it.

However, some containers currently running as privileged do not require this.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-cluster-baremetal-operator-container-v4.16.0-202402011710.p0.g345b62a.assembly.stream for distgit ose-cluster-baremetal-operator.
All builds following this will include this PR.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-02-02-002725

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.16.0-0.nightly-2024-05-08-222442

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. jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants