Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1884024 - Red Hat Satellite upgrade to 6.6 fails if duplicate permissions are present in foreman database
Summary: Red Hat Satellite upgrade to 6.6 fails if duplicate permissions are present i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.6.0
Hardware: All
OS: All
high
unspecified
Target Milestone: 6.8.1
Assignee: Suraj Patil
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-30 19:33 UTC by James Jeffers
Modified: 2023-12-15 19:36 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1849110
Environment:
Last Closed: 2020-11-23 17:13:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30527 0 High Closed Red Hat Satellite upgrade to 6.6 fails if duplicate permissions are present in foreman database 2020-12-02 16:19:26 UTC
Red Hat Knowledge Base (Solution) 5061001 0 None None None 2020-09-30 19:34:05 UTC
Red Hat Product Errata RHBA-2020:5180 0 None None None 2020-11-23 17:14:05 UTC

Comment 1 Bryan Kearney 2020-09-30 20:05:20 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30527 has been resolved.

Comment 2 Jameer Pathan 2020-11-05 12:09:50 UTC
Verified:

Verified with:
- Satellite 6.8.1 snap 1
- rubygem-foreman_maintain-0.6.13-1.el7sat.noarch

Test steps:
- Create a role. 
- Create filters 
- Create duplicate permissions and add duplicate permissions to filters.
- Run pre-upgrade check "foreman-maintain health check --label duplicate_permissions"

Observation:
- foreman-maintain check duplicate_permissions deleted duplicate permissions.
- duplicate_permissions check is added to pre-upgrade checks list.

[root@hpe-dl380egen8-01 ~]# foreman-maintain health check --label duplicate_permissions
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check for duplicate permissions from database:                        [FAIL]
Duplicate permissions in your database
--------------------------------------------------------------------------------
Continue with step [Remove duplicate permissions from database]?, [y(yes), n(no), q(quit)] y
Remove duplicate permissions from database:                           [OK]      
--------------------------------------------------------------------------------
Rerunning the check after fix procedure
Check for duplicate permissions from database:                        [OK]
--------------------------------------------------------------------------------

[root@hpe-dl380egen8-01 ~]# foreman-maintain health check --label duplicate_permissions
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check for duplicate permissions from database:                        [OK]
--------------------------------------------------------------------------------

Creating duplicate permissions:
[root@dell-r430-20 ~]# sudo su - postgres
-bash-4.2$ psql foreman
psql (9.2.24)
Type "help" for help.

foreman=# INSERT INTO permissions (name, resource_type) VALUES ('edit_ansible_variables', 'AnsibleVariable');
INSERT 0 1
foreman=# INSERT INTO permissions (name, resource_type) VALUES ('view_ansible_roles', 'AnsibleRole');
INSERT 0 1

Comment 7 errata-xmlrpc 2020-11-23 17:13:53 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.8.1 Async Bug Fix 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-2020:5180


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