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 2168923 - insights-client-3.1.7-8 fails to upload data due to AVC denial error for file '.cache.json.asc'
Summary: insights-client-3.1.7-8 fails to upload data due to AVC denial error for file...
Keywords:
Status: CLOSED DUPLICATE of bug 2143309
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: insights-client
Version: 8.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Nobody
QA Contact: Nobody
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-10 15:06 UTC by Amar Huchchanavar
Modified: 2023-03-06 15:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-06 15:52:08 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-148311 0 None None None 2023-02-10 15:06:51 UTC

Description Amar Huchchanavar 2023-02-10 15:06:28 UTC
Description of problem:

insights-client.service goes in to failed state due to SELinux denial for file /etc/insights-client/.cache.json.asc, this issue causes stale entries on the portal and system gets removed after 14 days of inactivity.

#less installed-rpms |grep insights 
insights-client-3.1.7-8.el8.noarch                          Sat Nov 19 08:54:27 2022

$ grep denied var/log/audit/audit.log |grep insights
type=AVC msg=audit(1674364122.669:71454): avc:  denied  { write } for  pid=622627 comm="platform-python" name="insights-client" dev="dm-2" ino=17301096 scontext=system_u:system_r:insights_client_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=dir permissive=0
type=AVC msg=audit(1674364123.082:71455): avc:  denied  { write } for  pid=622627 comm="platform-python" name=".cache.json.asc" dev="dm-0" ino=134304839 scontext=system_u:system_r:insights_client_t:s0 tcontext=unconfined_u:object_r:insights_client_etc_t:s0 tclass=file permissive=0
type=AVC msg=audit(1674364125.084:71456): avc:  denied  { write } for  pid=622635 comm="platform-python" name="insights-client" dev="dm-2" ino=17301096 scontext=system_u:system_r:insights_client_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=dir permissive=0
.
.
type=AVC msg=audit(1674710083.270:79394): avc:  denied  { write } for  pid=667163 comm="platform-python" name=".cache.json.asc" dev="dm-0" ino=134304839 scontext=system_u:system_r:insights_client_t:s0 tcontext=unconfined_u:object_r:insights_client_etc_t:s0 tclass=file permissive=0
type=AVC msg=audit(1674710085.250:79395): avc:  denied  { write } for  pid=667171 comm="platform-python" name="insights-client" dev="dm-2" ino=17301096 scontext=system_u:system_r:insights_client_t:s0 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=dir permissive=0
type=AVC msg=audit(1674710085.593:79396): avc:  denied  { write } for  pid=667171 comm="platform-python" name=".cache.json.asc" dev="dm-0" ino=134304839 scontext=system_u:system_r:insights_client_t:s0 tcontext=unconfined_u:object_r:insi


$ grep insights sos_commands/systemd/systemctl_list-units
  insights-client-results.path                                                                     loaded active waiting   Monitor /etc/insights-client/.lastupload for modifications
* insights-client.service                                                                          loaded failed failed    Insights Client
  insights-client.timer                                                                            loaded active waiting   Insights Client Timer Task


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

  Distro:   [redhat-release] Red Hat Enterprise Linux release 8.7 (Ootpa)
  SELinux:  enforcing  (default enforcing)
  Booted kernel:  4.18.0-425.3.1.el8.x86_64



How reproducible:
Customer Env


Steps to Reproduce:
1. Pkg instlled: insights-client-3.1.7-8.el8.noarch
2. Daily auto uploads failing

Actual results:
insights-client.service fails to upload the latest results to the portal 

Expected results:
Successful upload every day


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