Bug 1091619 - Foreman_server.sh fails on database seeding
Summary: Foreman_server.sh fails on database seeding
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-foreman-installer
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: Installer
Assignee: Jason Guiditta
QA Contact: Ami Jeain
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-26 14:18 UTC by stuart.stent
Modified: 2014-09-08 17:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-08 17:39:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description stuart.stent 2014-04-26 14:18:25 UTC
Description of problem:


Version-Release number of selected component (if applicable):
reproduced on RHEL 6.5 , Centos 6.4 and 6.5

How reproducible:


Steps to Reproduce:
1. Follow steps on http://openstack.redhat.com/Deploying_RDO_using_Foreman
2. sh foreman_server.sh
3. 

Actual results:

/usr/share/openstack-foreman-installer/bin
rake aborted!
undefined method `class_params' for nil:NilClass

Tasks: TOP => db:seed


Expected results:


Additional info:


[root@foreman bin]# sudo -u foreman scl enable ruby193 'cd /usr/share/foreman; rake --trace db:seed RAILS_ENV=production FOREMAN_PROVISIONING=false'
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:abort_if_pending_migrations
rake aborted!
undefined method `class_params' for nil:NilClass
/usr/share/foreman/db/seeds.rb:354:in `block in <top (required)>'
/usr/share/foreman/db/seeds.rb:352:in `each'
/usr/share/foreman/db/seeds.rb:352:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `block in load'
/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:245:in `load'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:520:in `load_seed'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:309: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:seed

Comment 2 stuart.stent 2014-04-28 12:44:01 UTC
Ended up being a puppet version issue.

After installing puppet-server-3.2.4-1.el6 the installed proceeded normally

-- If a specific version of puppet is required this should be explicity stated in the docs ( not just as a vague reference to version 3.2.x in the troubleshooting section)

Comment 3 Jason Guiditta 2014-04-28 14:18:18 UTC
What version of puppet did you have that was broken?

Comment 4 stuart.stent 2014-04-28 14:27:53 UTC
puppet-server-3.5.1-1.el6

Comment 5 Jason Guiditta 2014-04-29 17:57:40 UTC
And I forgot to ask, what version of openstack-foreman-installer?  And was this havana or icehouse yum repo?

Comment 6 stuart.stent 2014-04-29 18:10:57 UTC
foreman-installer-1.3.1-1.el6.noarch
openstack-foreman-installer-1.0.6-1.el6.noarch

And the Havana repo

Comment 7 Felipe Alfaro Solana 2014-06-18 22:46:37 UTC
Any progress on this?

I'm having exactly the same problem:

# sudo -u foreman scl enable ruby193 "cd $FOREMAN_DIR; rake db:seed RAILS_ENV=production FOREMAN_PROVISIONING=false"
rake aborted!
undefined method `class_params' for nil:NilClass

Problem is that /usr/share/foreman/db/seeds.rb is unable to find Puppet classes used by Host Groups. For example, one Host Group mentions quickstack::nova_network::controller
 but seeds.rb is unable to find it and hence the failure.

# rpm -qi puppet-server foreman-installer
Name        : puppet-server                Relocations: (not relocatable)
Version     : 3.6.2                             Vendor: Puppet Labs
Release     : 1.el6                         Build Date: Mon 09 Jun 2014 11:09:55 PM CEST
Install Date: Wed 18 Jun 2014 10:21:04 PM CEST      Build Host: rpm-builder-4
Group       : System Environment/Base       Source RPM: puppet-3.6.2-1.el6.src.rpm
Size        : 10470                            License: ASL 2.0
Signature   : RSA/10, Tue 10 Jun 2014 06:45:02 PM CEST, Key ID 1054b7a24bd6ec30
URL         : http://puppetlabs.com
Summary     : Server for the puppet system management tool
Description :
Provides the central puppet server daemon which provides manifests to clients.
The server can also function as a certificate authority and file server.
Name        : foreman-installer            Relocations: (not relocatable)
Version     : 1.3.0                             Vendor: Red Hat, Inc.
Release     : 1.el6sat                      Build Date: Tue 22 Oct 2013 07:15:52 PM CEST
Install Date: Wed 18 Jun 2014 10:19:25 PM CEST      Build Host: x86-022.build.eng.bos.redhat.com
Group       : Applications/System           Source RPM: foreman-installer-1.3.0-1.el6sat.src.rpm
Size        : 1377226                          License: GPLv3+ and ASL 2.0
Signature   : RSA/8, Thu 19 Dec 2013 11:13:07 AM CET, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://theforeman.org
Summary     : Puppet-based installer for The Foreman
Description :
Complete installer for The Foreman life-cycle management system based on puppet and
script to generate answers for puppet manifests.

Any ideas?

Comment 8 stuart.stent 2014-06-18 22:52:19 UTC
Try installing puppet-server-3.2.xx.el6, before running thew script.


(In reply to Felipe Alfaro Solana from comment #7)
> Any progress on this?
> 
> I'm having exactly the same problem:
> 
> # sudo -u foreman scl enable ruby193 "cd $FOREMAN_DIR; rake db:seed
> RAILS_ENV=production FOREMAN_PROVISIONING=false"
> rake aborted!
> undefined method `class_params' for nil:NilClass
> 
> Problem is that /usr/share/foreman/db/seeds.rb is unable to find Puppet
> classes used by Host Groups. For example, one Host Group mentions
> quickstack::nova_network::controller
>  but seeds.rb is unable to find it and hence the failure.
> 
> # rpm -qi puppet-server foreman-installer
> Name        : puppet-server                Relocations: (not relocatable)
> Version     : 3.6.2                             Vendor: Puppet Labs
> Release     : 1.el6                         Build Date: Mon 09 Jun 2014
> 11:09:55 PM CEST
> Install Date: Wed 18 Jun 2014 10:21:04 PM CEST      Build Host: rpm-builder-4
> Group       : System Environment/Base       Source RPM:
> puppet-3.6.2-1.el6.src.rpm
> Size        : 10470                            License: ASL 2.0
> Signature   : RSA/10, Tue 10 Jun 2014 06:45:02 PM CEST, Key ID
> 1054b7a24bd6ec30
> URL         : http://puppetlabs.com
> Summary     : Server for the puppet system management tool
> Description :
> Provides the central puppet server daemon which provides manifests to
> clients.
> The server can also function as a certificate authority and file server.
> Name        : foreman-installer            Relocations: (not relocatable)
> Version     : 1.3.0                             Vendor: Red Hat, Inc.
> Release     : 1.el6sat                      Build Date: Tue 22 Oct 2013
> 07:15:52 PM CEST
> Install Date: Wed 18 Jun 2014 10:19:25 PM CEST      Build Host:
> x86-022.build.eng.bos.redhat.com
> Group       : Applications/System           Source RPM:
> foreman-installer-1.3.0-1.el6sat.src.rpm
> Size        : 1377226                          License: GPLv3+ and ASL 2.0
> Signature   : RSA/8, Thu 19 Dec 2013 11:13:07 AM CET, Key ID 199e2f91fd431d51
> Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
> URL         : http://theforeman.org
> Summary     : Puppet-based installer for The Foreman
> Description :
> Complete installer for The Foreman life-cycle management system based on
> puppet and
> script to generate answers for puppet manifests.
> 
> Any ideas?

Comment 9 Felipe Alfaro Solana 2014-06-18 22:56:03 UTC
I tried downgrading puppet and puppet-server:

# rpm -q puppet puppet-server
puppet-3.2.4-1.el6.noarch
puppet-server-3.2.4-1.el6.noarch

But this didn't solve this issue.


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