Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2118252 - dnf can't load foreman-protector.py as a regular user
Summary: dnf can't load foreman-protector.py as a regular user
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Packaging
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.12.0
Assignee: Evgeni Golov
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-15 08:24 UTC by Evgeni Golov
Modified: 2022-11-16 13:35 UTC (History)
3 users (show)

Fixed In Version: rubygem-foreman_maintain-1.1.5-1.el8sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:35:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35366 0 Normal New dnf can't load foreman-protector.py as a regular user 2022-08-15 08:26:05 UTC
Red Hat Issue Tracker SAT-12295 0 None None None 2022-08-18 14:42:56 UTC
Red Hat Issue Tracker SAT-13071 0 None None None 2022-10-21 15:34:40 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:35:25 UTC

Description Evgeni Golov 2022-08-15 08:24:53 UTC
Description of problem:
$ dnf search lol
Failed loading plugin "foreman-protector": [Errno 13] Permission denied: '/usr/lib/python3.6/site-packages/dnf-plugins/foreman-protector.py'
…

(the rest of the execution works fine, but the warning is rather useless)

Fixing this, you get:
$ dnf search lol
Last metadata expiration check: 0:07:59 ago on Mon 15 Aug 2022 08:14:13 AM UTC.
Error: Incorrect plugin configuration!

and only after fixing the config perms, you get:

$ dnf search lol
Last metadata expiration check: 0:09:20 ago on Mon 15 Aug 2022 08:14:13 AM UTC.
No matches found.



Version-Release number of selected component (if applicable):
6.11

How reproducible:
100%

Steps to Reproduce:
1. dnf search foreman
2.
3.

Actual results:
warnings

Expected results:
no warnings

Additional info:

Comment 1 Evgeni Golov 2022-08-15 08:26:04 UTC
Created redmine issue https://projects.theforeman.org/issues/35366 from this bug

Comment 2 Bryan Kearney 2022-08-15 12:05:11 UTC
Upstream bug assigned to egolov

Comment 3 Bryan Kearney 2022-08-15 12:05:13 UTC
Upstream bug assigned to egolov

Comment 4 jcallaha 2022-08-15 13:12:24 UTC
Does this mean that foreman-protector isn't actually working for that user? Granted they likely can't install anything, but if foreman-protector isn't stopping actions it should (because it isn't running for a user), that would change my opinion of this bug. Thanks!

Comment 5 Evgeni Golov 2022-08-15 14:27:19 UTC
(In reply to jcallaha from comment #4)
> Does this mean that foreman-protector isn't actually working for that user?
> Granted they likely can't install anything, but if foreman-protector isn't
> stopping actions it should (because it isn't running for a user), that would
> change my opinion of this bug. Thanks!

Correct, it is not working at all (as dnf can't load the code), but I don't think this is a big issue as the operations it prohibits are install/upgrade, which the user can't execute anyways.

So, it's more of a cosmetical issue, but still.

Comment 6 Bryan Kearney 2022-08-16 08:05:13 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35366 has been resolved.

Comment 10 Lukas Pramuk 2022-09-22 09:12:01 UTC
VERIFIED.

@Satellite 6.12.0 Snap11
rubygem-foreman_maintain-1.1.5-1.el8sat.noarch

by this simple manual reproducer:

# useradd user
# su - user
$ dnf search lol
Not root, Subscription Management repositories not updated
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)          51 MB/s |  52 MB     00:01    
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)       50 MB/s |  46 MB     00:00    
Last metadata expiration check: 0:00:13 ago on Thu 22 Sep 2022 05:05:57 AM EDT.
Reading Foreman protector configuration
*** Excluded total: 34610

WARNING: Excluding 34610 packages due to foreman-protector. 
Use foreman-maintain packages install/update <package> 
to safely install packages without restrictions.
Use foreman-maintain upgrade run for full upgrade.

No matches found.

>>> there are no warnings/errors when running dnf as non-root user

Comment 14 errata-xmlrpc 2022-11-16 13:35:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506


Note You need to log in before you can comment on or make changes to this bug.