Bug 2161742

Summary: Satellite 6.12 upgrade fails with error ERF73-0602 [Foreman::PermissionMissingException]: some permissions were not found: ["view_puppetclasses", "view_environments", :view_environments, :view_puppetclasses] (Foreman::PermissionMissingException)
Product: Red Hat Satellite Reporter: Odilon Sousa <osousa>
Component: Discovery PluginAssignee: Ron Lavi <rlavi>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: high Docs Contact:
Priority: high    
Version: 6.12.0CC: ahumbe, gtalreja, rlavi
Target Milestone: 6.12.2Keywords: PrioBumpGSS, Triaged, Upgrades
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_discovery-21.0.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2160297 Environment:
Last Closed: 2023-02-08 14:35:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Gaurav Talreja 2023-02-01 17:27:13 UTC
Verified.

Tested upgrade from 6.11.4.2 to 6.12.2, which passed successfully w/o puppet permission errors

Steps to reproduce mentioned issue:
1. Setup 6.12.2 Snap1.0 with Discovery installed
2. Add Discovery Manager and Discovery Reader roles for the admin user.
3. Revert the following PRs which were included for this and 6.11 BZ 2104339
  https://github.com/theforeman/foreman_discovery/pull/554
  https://github.com/theforeman/foreman_discovery/pull/594
4. Run the satellite-installer, which passes but the following warning exists in the logs,
...
2023-02-01T09:14:03 [W|app|] Could not create role 'Discovery Manager': ERF73-0602 [Foreman::PermissionMissingException]: some permissions were not found: [:view_environments, :view_puppetclasses]
...

Comment 7 errata-xmlrpc 2023-02-08 14:35:02 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 (Satellite 6.12.2 Async 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:0668