Bug 1193672

Summary: ruby193-rubygem-foreman-redhat_access-0.0.8-1 breaks Satellite 6.1.0 db:seed
Product: Red Hat Satellite Reporter: Jason Montleon <jmontleo>
Component: RH Cloud - InsightsAssignee: Lindani Phiri <lphiri>
Status: CLOSED CURRENTRELEASE QA Contact: jcallaha
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: bbuckingham, cwelton, jcallaha, kroberts, lphiri
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-10 19:46:57 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 Jason Montleon 2015-02-17 21:01:56 UTC
Description of problem:
ruby193-rubygem-foreman-redhat_access-0.0.8-1 causes the db:seed rake task to fail during install

Version-Release number of selected component (if applicable):
ruby193-rubygem-foreman-redhat_access-0.0.8-1

How reproducible:
Always

Steps to Reproduce:
1. install Satellite 6.1.0 Snap 3 and upgrade ruby193-rubygem-foreman-redhat_access-0.0.8-1
2. Run the installer

Actual results:
 foreman-rake db:seed --trace
mkdir: cannot create directory '/usr/share/foreman/.cache': Permission denied
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
Apipie cache enabled but not present yet. Run apipie:cache rake task to speed up API calls.
rake aborted!
some permissions were not found
/usr/share/foreman/app/models/role.rb:131:in `add_permissions'
/usr/share/foreman/app/models/role.rb:146:in `add_permissions!'
/usr/share/foreman/app/services/foreman/plugin.rb:201:in `block in role'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/usr/share/foreman/app/services/foreman/plugin.rb:199:in `role'
/opt/rh/ruby193/root/usr/share/gems/gems/redhat_access-0.0.8/lib/redhat_access/engine.rb:63:in `block (2 levels) in <class:Engine>'
/usr/share/foreman/app/services/foreman/plugin.rb:64:in `instance_eval'
/usr/share/foreman/app/services/foreman/plugin.rb:64:in `register'
/opt/rh/ruby193/root/usr/share/gems/gems/redhat_access-0.0.8/lib/redhat_access/engine.rb:37:in `block in <class:Engine>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:103:in `require_environment!'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:295:in `block (2 levels) in initialize_tasks'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:176:in `block in invoke_prerequisites'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in `invoke_prerequisites'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:157:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:308:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => db:abort_if_pending_migrations => environment


Expected results:
db:seed completes properly

Additional info:

Comment 1 Lindani Phiri 2015-02-17 22:40:43 UTC
Permission config was inadvertently left in gem while removing a feature.

Comment 3 Corey Welton 2015-02-20 16:26:50 UTC
QE Notes: Devtask, no need to test.

Comment 5 jcallaha 2015-02-27 19:56:33 UTC
Verified in Satellite 6.1.0 snap 4 compose 2.

Version tested:
RHEL 66
RHEL 71