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 1507073 - Upgrade from 6.2 ->6.3 w/ customer db failed at db:seed
Summary: Upgrade from 6.2 ->6.3 w/ customer db failed at db:seed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-27 15:24 UTC by Sachin Ghai
Modified: 2019-09-26 17:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21496 0 'Normal' 'Closed' 'Roles not properly removing permissions' 2019-11-11 23:51:55 UTC

Comment 2 Sachin Ghai 2017-10-27 15:27:33 UTC
Created attachment 1344352 [details]
foreman-debug

Comment 3 Sachin Ghai 2017-10-27 15:29:08 UTC
On re-running db:seed,  it raised another exception.. not sure if its relevant:

# /usr/sbin/foreman-rake db:seed --trace
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
Seeding /usr/share/foreman/db/seeds.d/02-partition_tables_list.rb
Seeding /usr/share/foreman/db/seeds.d/02-permissions_list.rb
Seeding /usr/share/foreman/db/seeds.d/02-provisioning_templates_list.rb
Seeding /usr/share/foreman/db/seeds.d/02-roles_list.rb
Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb
Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb
Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
rake aborted!
Foreman::PermissionMissingException: ERF73-2603 [Foreman::PermissionMissingException]: some permissions were not found
/usr/share/foreman/app/models/role.rb:288:in `permission_records'
/usr/share/foreman/app/models/role.rb:164:in `find_for_permission_removal'
/usr/share/foreman/app/models/role.rb:205:in `remove_permissions!'
/usr/share/foreman/lib/seed_helper.rb:80:in `block in update_role_permissions'
/usr/share/foreman/app/models/role.rb:228:in `ignore_locking'
/usr/share/foreman/lib/seed_helper.rb:72:in `update_role_permissions'
/usr/share/foreman/lib/seed_helper.rb:53:in `create_role'
/usr/share/foreman/db/seeds.d/03-roles.rb:9:in `block (3 levels) in <top (required)>'
/usr/share/foreman/db/seeds.d/03-roles.rb:8:in `each'
/usr/share/foreman/db/seeds.d/03-roles.rb:8:in `block (2 levels) in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.4.1/lib/audited/auditor.rb:283:in `without_auditing'
/usr/share/foreman/db/seeds.d/03-roles.rb:4:in `block in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.4.1/lib/audited/auditor.rb:283:in `without_auditing'
/usr/share/foreman/db/seeds.d/03-roles.rb:3:in `<top (required)>'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/usr/share/foreman/db/seeds.rb:38:in `block in <top (required)>'
/usr/share/foreman/db/seeds.rb:36:in `each'
/usr/share/foreman/db/seeds.rb:36:in `<top (required)>'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/rh-ror42/root/usr/share/gems/gems/railties-4.2.6/lib/rails/engine.rb:547:in `load_seed'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:250:in `load_seed'
/opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:183:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby23/root/usr/share/ruby/monitor.rb:214:in `mon_synchronize'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/opt/rh/rh-ruby23/root/usr/share/gems/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/opt/rh/rh-ruby23/root/usr/bin/rake:23:in `load'
/opt/rh/rh-ruby23/root/usr/bin/rake:23:in `<main>'
Tasks: TOP => db:seed

Comment 4 Brad Buckingham 2017-10-27 17:11:25 UTC
Assigning over to Partha as he is currently investigating.

Comment 5 Partha Aji 2017-10-27 17:20:31 UTC
needs this patch
https://gist.github.com/parthaa/fa5ff7118d35c9763c4c2cdcc5cea4df

Will create an upstream issue and PR in a few

Comment 7 Partha Aji 2017-10-27 20:04:17 UTC
Connecting redmine issue http://projects.theforeman.org/issues/21496 from this bug

Comment 9 Sachin Ghai 2017-11-01 03:39:38 UTC
Thanks Partha. Reported issue has been fixed. I used same DB w/ which I found the issue reported in description. After the fix, I was not able to reproduce. Moving to verified.

Comment 12 Satellite Program 2018-02-21 16:54:37 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, 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/RHSA-2018:0336


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