Project

General

Profile

Actions

Bug #4512

open

foreman_url in settings.yaml causes DB migration failure

Added by Daniel Erxleben about 10 years ago. Updated about 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

System info:

Centos 6.5
2.6.32-358.23.2.el6.x86_64
puppetserver :3.4.3-1
ruby 131

upgrade went without error. When I attempt to browse hosts I get:

Warning!
undefined local variable or method `description' for #

with a stack trace of:

NameError
undefined local variable or method `description' for #<Redhat:0x007f98ac9ec3d8>
app/models/operatingsystem.rb:119:in `to_label'
app/views/hosts/_list.html.erb:20:in `block in app_views_hosts_list_html_erb__1802655188597566344_69250700'
app/views/hosts/_list.html.erb:14:in `_app_views_hosts__list_html_erb__1802655188597566344_69250700'
app/views/hosts/index.html.erb:4:in `_app_views_hosts_index_html_erb___969333330980872441_69058260'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

production log dumps out:

Started GET "/hosts?search=last_report+%3C+%2235+minutes+ago%22+and+status.enabled+%3D+true" for 10.1.16.42 at 2014-03-01 20:51:30 -0500
Processing by HostsController#index as HTML
Parameters: {"search"=>"last_report < \"35 minutes ago\" and status.enabled = true"}
Rendered hosts/_list.html.erb (8.7ms)
Rendered hosts/index.html.erb within layouts/application (12.5ms)
Operation FAILED: undefined local variable or method `description' for #<Redhat:0x007f26d50040d0>
Rendered common/500.html.erb within layouts/application (4.1ms)
Rendered layouts/base.html.erb (1.4ms)
Completed 500 Internal Server Error in 45ms (Views: 6.8ms | ActiveRecord: 0.0ms)


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Bug #4302: dbmigrate fails if :foreman_url is not correctly setDuplicate02/10/2014Actions
Actions #1

Updated by Ohad Levy about 10 years ago

can you see if you got any errors in the logs?

please try to execute again:

foreman-rake db:migrate
foreman-rake db:seed
Actions #2

Updated by Dominic Cleal about 10 years ago

  • Status changed from New to Feedback

And then restart Foreman or httpd after running the above commands.

Actions #3

Updated by Daniel Erxleben about 10 years ago

This has been resolved. foreman-rake db:migrate was giving the error:

UpdateForemanUrl: migrating =============================================
rake aborted!
An error has occurred, all later migrations canceled:

ActiveRecord::ReadOnlyRecord

Which apparently is resolved by commenting out :foreman_url: in the settings.yaml. Any input to this?

I can now view all hosts.

Thanks,

Actions #4

Updated by Dominic Cleal about 10 years ago

  • Tracker changed from Support to Bug
  • Subject changed from Error navigating the UI after 1.4.1 upgrade from 1.3.2 to foreman_url in settings.yaml causes DB migration failure
  • Category set to DB migrations
  • Priority changed from Urgent to Normal

Ah, glad you found it. You can set foreman_url instead under Adminster > Settings > foreman_url.

Actions #5

Updated by Dominic Cleal about 10 years ago

  • Status changed from Feedback to New
Actions #6

Updated by Anonymous almost 7 years ago

  • Has duplicate Bug #4302: dbmigrate fails if :foreman_url is not correctly set added
Actions

Also available in: Atom PDF