Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2213624

Summary: insights-client prevents system installation due to post script.
Product: Red Hat Enterprise Linux 9 Reporter: jcastran
Component: insights-clientAssignee: CSI Client Tools Bugs <csi-client-tools-bugs>
Status: CLOSED DUPLICATE QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 9.2CC: cmarinea, fjansen, stomsa
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-08 19:25:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jcastran 2023-06-08 18:47:15 UTC
Description of problem:
RHEL 9.2 fails to install if insights-client-3.1.7-10.el9_1 or 3.1.7-12.el9 is part of the transaction due to the post-install script.


This line was added starting in `insights-client-3.1.7-10.el9_1`

> semanage permissive --add insights_client_t

Version-Release number of selected component (if applicable):
RHEL 9.1 installations using latest/registering during install
RHEL 9.2 installation use GA DVD or registering

How reproducible:
Everytime

Steps to Reproduce:
1. kickstart with insights-client

  %packages
  @^minimal-environment
  insights-client
  %end

2. start 9.2 installation


Actual results:
14:30:09,266 INF packaging: Installed: insights-client-3.1.7-12.el9.noarch 1668180397 c06e59869aee47cdc60c9bf8ada3a55474d54678f1cadf153751aa53c1aee2cc
14:30:09,365 INF packaging: Configuring (running scriptlet for): insights-client-3.1.7-12.el9.noarch 1668180397 c06e59869aee47cdc60c9bf8ada3a55474d54678f1cadf153751aa53c1aee2cc
14:30:09,900 INF dnf.rpm: Created symlink /etc/systemd/system/multi-user.target.wants/insights-client-boot.service <E2><86><92> /usr/lib/systemd/system/insights-client-boot.service.
ValueError: SELinux policy is not managed or store cannot be accessed.
warning: %post(insights-client-0:3.1.7-12.el9.noarch) scriptlet failed, exit status 1

14:30:09,901 ERR dnf.rpm: Error in POSTIN scriptlet in rpm package insights-client


Additional info:

Comment 1 jcastran 2023-06-08 19:11:07 UTC
This was encountered in RHEL 8 in https://bugzilla.redhat.com/show_bug.cgi?id=2150908 and resolved with 

[RHBA-2023:2803 - Bug Fix Advisory - Red Hat Customer Portal](https://access.redhat.com/errata/RHBA-2023:2803)

This introduced an if statement. 

~~~
[root@r8 ~]# rpm -q insights-client --scripts
postinstall scriptlet (using /bin/sh):

<snip>

if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
    /usr/sbin/semanage permissive --add insights_client_t || true
fi
~~~

Comment 2 jcastran 2023-06-08 19:17:42 UTC
Just found the what this looks to be a clone of

https://bugzilla.redhat.com/show_bug.cgi?id=2196844
https://bugzilla.redhat.com/show_bug.cgi?id=2210269

Comment 3 Pino Toscano 2023-06-08 19:25:59 UTC

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