Hi,
I recently upgraded from Foreman 1.1.1 to 1.2.2 and get the error
"undefined method `reports'" when clicking on a host view in the Foreman
GUI. e.g. http://master.example.com:4000/hosts/foo.example.com, gives me
"Oops, something with wrong" with this stack trace:
NoMethodError
*undefined method reports' for #<Host::Base:0x7fe55e06ba80>* app/models/report.rb:142:in
summarise'
app/models/report.rb:138:in each' app/models/report.rb:138:in
summarise'
app/controllers/hosts_controller.rb:62:in show' app/controllers/hosts_controller.rb:56:in
show'
lib/foreman/thread_session.rb:31:in `clear_thread'
Puppetmaster and foreman host:
CentOS 6.4
ruby 1.8.7
Puppet 3.1.1
puppetDB 1.4
Apache 2.4.6, passenger 4.0.5
I was using storeconfigs, but moved to puppetdb since Foreman 1.2 now
requires it. I was using a shared postgres db between puppet and foreman,
but now only foreman uses the postgres db, and puppetdb has its own
postgres db. I checked logs for apache, foreman, puppet, puppetdb, and
system logs, but all look clean.
I did not install Foreman from packages, but from git:
cd /usr/local
git clone git@github.com:theforeman/foreman.git foreman-1.2.2
cd foreman-1.2.2
git checkout tags/1.2.2
bundle exec rake db:migrate RAILS_ENV=production
bundle install
RAILS_ENV=production bundle exec rake assets:precompile
Here is the master's /etc/puppet/puppet.conf:
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet
# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet
# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl
server = master.example.com
pluginsync = true
# puppet run (trigger puppet from puppet master)
listen = true
modulepath=/etc/puppet/modules
[agent]
environment = production
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate puppet
executable using the --loadclasses
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
report = true
[master]
reports = foreman
facts_terminus = yaml
node_terminus = exec
external_nodes = /etc/puppet/node.rb
dns_alt_names=puppet,puppet.example.com,master,master.example.com
apache/passenger
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
storeconfigs
storeconfigs = true
storeconfigs_backend = puppetdb
Any insight or troubleshooting tips would be appreciated.