Project

General

Profile

Actions

Bug #5688

closed

Cannot login after upgrade from 1.4.1 to 1.5.1

Added by Ollie Lawson almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I have upgraded following the steps at http://theforeman.org/manuals/1.5/index.html#3.6Upgrade and now after login (as admin) in I get:

Warning!
undefined method `avatar_hash' for #<User:0x000000081e1d30>

Stack trace is:
NoMethodError
undefined method `avatar_hash' for #<User:0x000000081e1d30>
app/helpers/application_helper.rb:336:in `avatar_image_tag'
app/helpers/home_helper.rb:47:in `user_header'
app/views/home/_user_dropdown.html.erb:2:in `_app_views_home__user_dropdown_html_erb__1414197084760456750_65123600'
app/views/home/_topbar.html.erb:14:in `_app_views_home__topbar_html_erb__1416470694707807501_64043380'
app/views/layouts/base.html.erb:43:in `_app_views_layouts_base_html_erb___2194225959891543969_64536280'
app/views/layouts/application.html.erb:28:in `_app_views_layouts_application_html_erb__220818452840898789_49758440'
app/controllers/dashboard_controller.rb:6:in `index'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Actions #1

Updated by Dominic Cleal almost 10 years ago

This looks like the database migration didn't run, and/or Foreman needs a restart to pick up on it. Please try:

  • foreman-rake db:migrate
  • foreman-rake db:seed
  • service httpd restart (or service apache2 restart on Debian/Ubuntu)
Actions #2

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Feedback
Actions #3

Updated by Ollie Lawson almost 10 years ago

Hi Dominic,

I've run the rake commands and in all instances I get:

[root@puppet public]# pwd
/var/lib/foreman/public
[root@puppet public]# foreman-rake db:migrate
could not open session
[root@puppet public]#

Any ideas?

Thanks

Actions #4

Updated by Dominic Cleal almost 10 years ago

Can you check permissions on your /etc/pam.d files are correct? The error suggests that "su" isn't working on your system.

-rw-r--r--. 1 root root 487 Apr 17  2012 /etc/pam.d/su
-rw-r--r--. 1 root root 202 Nov 22 12:51 /etc/pam.d/sudo
-rw-r--r--. 1 root root 187 Nov 22 12:51 /etc/pam.d/sudo-i
-rw-r--r--. 1 root root 137 Apr 17  2012 /etc/pam.d/su-l
lrwxrwxrwx. 1 root root  14 Sep 11  2013 /etc/pam.d/system-auth -> system-auth-ac
-rw-r--r--. 1 root root 937 Sep 11  2013 /etc/pam.d/system-auth-ac
Actions #5

Updated by Ollie Lawson almost 10 years ago

Thanks Dominic,

It was a pam issue but not related to Puppet/Foreman.

Actions #6

Updated by Dominic Cleal almost 10 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF