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 2150908 - ValueError: SELinux policy is not managed or store cannot be accessed.
Summary: ValueError: SELinux policy is not managed or store cannot be accessed.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: insights-client
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Link Dupont
QA Contact: Nobody
URL:
Whiteboard: SCRUB_20230105
: 2168259 (view as bug list)
Depends On:
Blocks: 2164602 2196844
TreeView+ depends on / blocked
 
Reported: 2022-12-05 15:49 UTC by Jan Stodola
Modified: 2023-05-16 09:36 UTC (History)
9 users (show)

Fixed In Version: insights-client-3.1.7-12.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2164602 2196844 (view as bug list)
Environment:
Last Closed: 2023-05-16 08:30:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
yum install --installroot=/root/installroot/ insights-client (108.74 KB, text/plain)
2022-12-05 15:54 UTC, Jan Stodola
no flags Details
kickstart (170 bytes, text/plain)
2022-12-06 11:09 UTC, Jan Stodola
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-141325 0 None None None 2022-12-05 16:05:18 UTC
Red Hat Product Errata RHBA-2023:2803 0 None None None 2023-05-16 08:31:06 UTC

Description Jan Stodola 2022-12-05 15:49:20 UTC
Description of problem:
There is an error when installing insights-client as part of a system installation process:

...
23:37:38,752 INFO anaconda:packaging: Installed: python3-policycoreutils-2.9-20.el8.noarch 1657901842 71676aca45858e9e25878e4153d08e31beef91a916b85547105c8f911e4c29ca
23:37:39,404 INFO anaconda:packaging: Installed: policycoreutils-python-utils-2.9-20.el8.noarch 1657901842 685dd552b73037e654323714b550d5c532dcbe80ac1c704b19d46b971a5dd921
23:37:39,471 INFO anaconda:packaging: Installed: insights-client-3.1.7-11.el8.noarch 1668185030 bc7487b118579b150c445d9d531abf569b2f16a68e302c96c2cc423d20d897db
23:37:39,665 INFO anaconda:packaging: Configuring (running scriptlet for): insights-client-3.1.7-11.el8.noarch 1668185030 bc7487b118579b150c445d9d531abf569b2f16a68e302c96c2cc423d20d897db
23:37:40,376 INFO anaconda:dnf: ValueError: SELinux policy is not managed or store cannot be accessed.#012warning: %post(insights-client-0:3.1.7-11.el8.noarch) scriptlet failed, exit status 1
23:37:40,379 ERR anaconda:dnf: Error in POSTIN scriptlet in rpm package insights-client


Unfortunately there is no reliable reproducer, most probably due to the order of the packages being installed in the transaction.
However the same problem can be reproduced when installing insights-client into a clean install root:


# mkdir /root/installroot
# yum install --installroot=/root/installroot/ insights-client
...
  Installing       : pciutils-3.7.0-3.el8.x86_64                                                            190/191 
  Installing       : insights-client-3.1.7-11.el8.noarch                                                    191/191 
  Running scriptlet: insights-client-3.1.7-11.el8.noarch                                                    191/191 
ValueError: SELinux policy is not managed or store cannot be accessed.
warning: %post(insights-client-0:3.1.7-11.el8.noarch) scriptlet failed, exit status 1

Error in POSTIN scriptlet in rpm package insights-client
  Running scriptlet: filesystem-3.8-6.el8.x86_64                                                            191/191 
  Running scriptlet: glibc-all-langpacks-2.28-223.el8.x86_64                                                191/191

Version-Release number of selected component (if applicable):
insights-client-3.1.7-11.el8

How reproducible:
Always when installing to a clean install root

Steps to Reproduce:
1. # mkdir /root/installroot
2. # yum install --installroot=/root/installroot/ insights-client

Actual results:
Error in POSTIN scriptlet

Expected results:
No errors

Additional info:
Perhaps related to the change in bug 2141444.

Comment 2 Jan Stodola 2022-12-05 15:54:33 UTC
Created attachment 1930134 [details]
yum install --installroot=/root/installroot/ insights-client

Installing insights-client to a clean installroot.

Comment 3 Jan Stodola 2022-12-06 11:09:28 UTC
Created attachment 1930450 [details]
kickstart

The bug can be reproduced on the latest RHEL-8.8 development compose when running a kickstart installation and excluding packages with weak dependencies:

%packages --excludeWeakdeps
%end

The whole kickstart is attached. In this case the installation stops and it's not possible to continue.

Proposing as a blocker.

Comment 13 Link Dupont 2023-03-06 17:58:17 UTC
*** Bug 2168259 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2023-05-16 08:30:42 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 (insights-client bug fix and enhancement update), 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/RHBA-2023:2803


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