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-30149: Revert "common.yaml: enable cliwrap" #1455

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Mar 4, 2024

This reverts commit ff686c6.

With cliwrap, rpm-ostree runs rpm with less privileges. We special-case --query, so e.g. rpm -qf still runs with dropped privileges.

But anyway, we actually want to reduce this to wrapping just dnf for now (see discussions in
coreos/fedora-coreos-config#2887).

Resolves: https://issues.redhat.com/browse/OCPBUGS-30149

This reverts commit ff686c6.

With cliwrap, rpm-ostree runs rpm with less privileges. We special-case
`--query`, so e.g. `rpm -qf` still runs with dropped privileges.

But anyway, we actually want to reduce this to wrapping *just* `dnf` for
now (see discussions in
coreos/fedora-coreos-config#2887).

Resolves: https://issues.redhat.com/browse/OCPBUGS-30149
@openshift-ci openshift-ci bot requested review from cverna and HuijingHei March 4, 2024 19:04
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 4, 2024
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@jlebon
Copy link
Member Author

jlebon commented Mar 4, 2024

While CI is running on this, let me sanity-check that's what we're hitting in https://issues.redhat.com/browse/OCPBUGS-30149.
/hold

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

openshift-ci bot commented Mar 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlebon, jmarrero

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

@jlebon
Copy link
Member Author

jlebon commented Mar 4, 2024

Yup, confirmed:

[root@cosa-devsh ~]# rpm -qf /root/test
error: file /root/test: Permission denied
[root@cosa-devsh ~]# /usr/libexec/rpm-ostree/wrapped/rpm -qf /root/test
error: file /root/test: No such file or directory

/hold cancel

I'll add a test for this as part of coreos/fedora-coreos-config#2887 that'll be shared with FCOS.

@jlebon
Copy link
Member Author

jlebon commented Mar 4, 2024

It's interesting though; it seems the EPERM only shows up when querying a file that doesn't exist. Otherwise, it works as usual. E.g.:

[root@cosa-devsh ~]# rpm -qf /etc/audit/rules.d/audit.rules
audit-3.1.2-2.el9.x86_64
[root@cosa-devsh ~]# rpm -qf /etc/audit/rules.d/enoent
error: file /etc/audit/rules.d/enoent: Permission denied

So even with this, it's possible that the MCO might still get an error (but this time about the file not existing) which wouldn't be related to this change.

@mike-nguyen
Copy link
Member

On the previous working build it gives us the correct error when querying for a file that doesn't exist.

[root@cosa-devsh ~]# rpm -qf /etc/audit/rules.d/enoent
error: file /etc/audit/rules.d/enoent: No such file or directory

@mike-nguyen
Copy link
Member

/retitle OCPBUGS-30149: Revert "common.yaml: enable cliwrap"

@openshift-ci openshift-ci bot changed the title Revert "common.yaml: enable cliwrap" OCPBUGS-30149: Revert "common.yaml: enable cliwrap" Mar 4, 2024
@openshift-ci-robot openshift-ci-robot added 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 Mar 4, 2024
@openshift-ci-robot
Copy link

@jlebon: This pull request references Jira Issue OCPBUGS-30149, 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:

This reverts commit ff686c6.

With cliwrap, rpm-ostree runs rpm with less privileges. We special-case --query, so e.g. rpm -qf still runs with dropped privileges.

But anyway, we actually want to reduce this to wrapping just dnf for now (see discussions in
coreos/fedora-coreos-config#2887).

Resolves: https://issues.redhat.com/browse/OCPBUGS-30149

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.

@mike-nguyen
Copy link
Member

/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 Mar 4, 2024
@openshift-ci-robot
Copy link

@mike-nguyen: This pull request references Jira Issue OCPBUGS-30149, 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)

Requesting review from QA contact:
/cc @sergiordlr

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.

@openshift-ci openshift-ci bot requested a review from sergiordlr March 4, 2024 20:22
Copy link
Contributor

openshift-ci bot commented Mar 4, 2024

@jlebon: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 873c696 into openshift:master Mar 4, 2024
7 checks passed
@openshift-ci-robot
Copy link

@jlebon: Jira Issue OCPBUGS-30149: All pull requests linked via external trackers have merged:

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

In response to this:

This reverts commit ff686c6.

With cliwrap, rpm-ostree runs rpm with less privileges. We special-case --query, so e.g. rpm -qf still runs with dropped privileges.

But anyway, we actually want to reduce this to wrapping just dnf for now (see discussions in
coreos/fedora-coreos-config#2887).

Resolves: https://issues.redhat.com/browse/OCPBUGS-30149

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.

@sinnykumari
Copy link

So even with this, it's possible that the MCO might still get an error (but this time about the file not existing) which wouldn't be related to this change.

Interesting, from the bug /etc/audit/rules.d/mco-audit-quiet-containers.rules do exist on the node and rpm -qf gives permission denied error. We will get to know better after MCO code runs with the fix.

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/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.

5 participants