Bug 1191265

Summary: rake failures with update bastion and angular-rails-templates
Product: Red Hat Satellite Reporter: Jason Montleon <jmontleo>
Component: OtherAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Elyézer Rezende <erezende>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: bbuckingham, cwelton, ehelms, erezende, jhutar, walden
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-08-12 05:24:27 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-10 21:37:37 UTC
Description of problem:
The following error was seen during the installer and while running a foreman-rake db:migrate --trace. There is some noise from a bad version of a bad new version of foreman_bootdisk that works only with foreman 1.8 as well.

[root@el7-smoketest ~]# katello-installer --foreman-admin-password=changeme; export FORWARDERS=$(for i in $(cat /etc/resolv.conf |grep nameserver|awk '{print $2}'); do echo --capsule-dns-forwarders $i;done) && export OAUTH_SECRET=$(grep oauth_consumer_secret /etc/foreman/settings.yaml | cut -d ' ' -f 2) && katello-installer --capsule-parent-fqdn $(hostname) --capsule-dns true $FORWARDERS --capsule-dns-interface eth0 --capsule-dns-zone katellolabs.org --capsule-dhcp true --capsule-dhcp-interface eth0 --capsule-tftp true --capsule-puppet true --capsule-puppetca true --capsule-register-in-foreman true --capsule-foreman-oauth-secret $OAUTH_SECRET
 /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0]
 /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0]

[root@el7-smoketest ~]# foreman-rake db:migrate --trace
mkdir: cannot create directory '/usr/share/foreman/.cache': Permission denied
** Invoke db:migrate (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.
foreman_bootdisk: skipping engine hook (PGError: ERROR:  relation "template_kinds" does not exist
LINE 4:              WHERE a.attrelid = '"template_kinds"'::regclass
                                        ^
:             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
              FROM pg_attribute a LEFT JOIN pg_attrdef d
                ON a.attrelid = d.adrelid AND a.attnum = d.adnum
             WHERE a.attrelid = '"template_kinds"'::regclass
               AND a.attnum > 0 AND NOT a.attisdropped
             ORDER BY a.attnum
)
rake aborted!
can't modify immutable index
/opt/rh/ruby193/root/usr/share/gems/gems/sprockets-2.10.1/lib/sprockets/index.rb:81:in `expire_index!'
/opt/rh/ruby193/root/usr/share/gems/gems/sprockets-2.10.1/lib/sprockets/base.rb:168:in `register_engine'
/opt/rh/ruby193/root/usr/share/gems/gems/angular-rails-templates-0.1.3/lib/angular-rails-templates/engine.rb:49:in `block (2 levels) in <class:Engine>'
/opt/rh/ruby193/root/usr/share/gems/gems/angular-rails-templates-0.1.3/lib/angular-rails-templates/engine.rb:39:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/angular-rails-templates-0.1.3/lib/angular-rails-templates/engine.rb:39: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/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:migrate => environment
[root@el7-smoketest ~]#

Version-Release number of selected component (if applicable):
ruby193-rubygem-bastion-0.2.2-2.el7sat
ruby193-rubygem-angular-rails-templates-0.1.3-2.el7sat

How reproducible:
Always

Steps to Reproduce:
1. Install Satellite 6.1 Beta Snap 2
2. Update these two packages
3. Run installer

Actual results:
Installation fails

Expected results:
Installation succeeds.

Additional info:

Comment 2 Eric Helms 2015-02-13 15:09:15 UTC
Latest Bastion 0.2.5 should fix this but will require angular-rails-templates 0.1.12

Comment 3 Corey Welton 2015-02-17 18:10:11 UTC
qe notes: dev task, no real qe required.

Comment 6 Elyézer Rezende 2015-03-09 18:52:16 UTC
Verified on: Satellite-6.1.0-RHEL-7-20150303.0

Steps to verify:

[root@sat6 ~]# rpm -q ruby193-rubygem-bastion
ruby193-rubygem-bastion-0.2.9-1.el7sat.noarch
[root@sat6 ~]# rpm -q ruby193-rubygem-angular-rails-templates
ruby193-rubygem-angular-rails-templates-0.1.2-1.el7sat.noarch
[root@sat6 ~]# foreman-rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:dump
[root@sat6 ~]# echo $?
0

Installation completed with no similar error as stated in the bug description.

Comment 8 Bryan Kearney 2015-08-11 13:34:36 UTC
This bug is slated to be released with Satellite 6.1.

Comment 9 errata-xmlrpc 2015-08-12 05:24:27 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-2015:1592