RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1996720 - Service rhsmcertd is unable to create cache files in /var/cache/cloud-what
Summary: Service rhsmcertd is unable to create cache files in /var/cache/cloud-what
Keywords:
Status: CLOSED DUPLICATE of bug 1994718
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.5
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-23 14:22 UTC by Jiri Hnidek
Modified: 2022-01-05 13:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-24 07:31:38 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-94462 0 None None None 2021-08-23 14:23:52 UTC

Description Jiri Hnidek 2021-08-23 14:22:03 UTC
Description of problem:
The service rhsmcertd.service is not able to create any cache file in /var/cache/cloud-what, because rhsmcertd.service uses code from new RPM python3-cloud-what. The python3-cloud-what package does not create cache files in /var/lib/rhsm/cache as rhsmcertd, but it has its own cache directory /var/cache/cloud-what and selinux denies rhsmcertd.service to create cache files there. It cause unnecessary HTTP requests to AWS IMDS servers. 


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

[root@ip-10-0-0-158 ~]# rpm -q subscription-manager
subscription-manager-1.28.20-1.git.6.504eaaf.el8.x86_64


How reproducible:
100%


Steps to Reproduce:
1. Create AWS instance and enable only IMDSv2 in the AWS wizard.

2. Start AWS instance

3. Enable automatic registration of the system using (and optionally disable splay option to not wait for result too long):
subscription-manager config --rhsmcertd.auto_registration=1
subscription-manager config --rhsmcertd.splay=0

4. Start rhsmcertd.service
[root@ip-10-0-0-158 ~]# systemctl start rhsmcertd.service

5. Wait two-three minutes for result

6. Check /var/log/rhsm/rhsm.log


Actual results:
You can observer several warning messages with following error: Permission denied: '/var/cache/cloud-what/aws_token.json'


Expected results:
rhsmcertd.service should be able to create cache file in: /var/cache/cloud-what/


Additional info:

More details here: https://bugzilla.redhat.com/show_bug.cgi?id=1922151#c11

Latest scratch build of subscription-manager: http://brew-task-repos.usersys.redhat.com/repos/scratch/jhnidek/subscription-manager/1.29.18/1.git.41.c29535a.el8/x86_64/

PR of selinux-policy for Fedora: https://github.com/fedora-selinux/selinux-policy/pull/836

Comment 1 Zdenek Pytela 2021-08-24 07:31:38 UTC

*** This bug has been marked as a duplicate of bug 1994718 ***


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