ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.34k stars 897 forks source link

Exception when opening the Cloud Provider tab #4070

Closed lgalis closed 9 years ago

lgalis commented 9 years ago

screenshot from 2015-08-26 16-39-52

lgalis commented 9 years ago

@miq-bot add_label providers @miq-bot add_label bug

Fryguy commented 9 years ago

Offhand, this might be for @matthewd ...can you review.

blomquisg commented 9 years ago

This looks like the db migrations were not run...

The only way I can think to test this out is to have an environment from before the namespace, add an amazon provider (that also has at least one auth keypair), then update your local env to the latest master and try this again. Chances are you will see this error.

Then, run rake db:migrate and you should no longer see this error.

If the error is still there, then a migration was missed.

Fryguy commented 9 years ago

Oh good idea @blomquisg. @lgalis If you migrate, does the problem go away?

lgalis commented 9 years ago

@fryguy, @blomquisg I did migrate before I opened the issue. ( I also ran a test locally with a modified {inheritance_column} to something other that 'type' for the Authentication class and with that the error went away ).

Here is the trace for the upstream:

[----] I, [2015-08-27T11:19:37.030847 #9886:1097990] INFO -- : Rendered ems_cloud/show_list.html.haml within layouts/application (314.6ms) [----] F, [2015-08-27T11:19:37.031223 #9886:1097990] FATAL -- : Error caught: [ActiveRecord::SubclassNotFound] The single-table inheritance mechanism failed to locate the subclass: 'AuthKeyPairAmazon'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite Authentication.inheritance_column to use another column for that information. /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/inheritance.rb:186:in rescue in find_sti_class' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/inheritance.rb:180:infind_sti_class' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/inheritance.rb:169:in discriminate_class_for_record' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/persistence.rb:67:ininstantiate' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/querying.rb:50:in block (2 levels) in find_by_sql' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/result.rb:51:inblock in each' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/result.rb:51:in each' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/result.rb:51:ineach' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/querying.rb:50:in map' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/querying.rb:50:inblock in find_by_sql' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.4/lib/active_support/notifications/instrumenter.rb:20:in instrument' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/querying.rb:49:infind_by_sql' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/statement_cache.rb:107:in execute' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_association.rb:445:inget_records' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_association.rb:449:in find_target' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_association.rb:392:inload_target' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_association.rb:77:in select' /home/lgalis/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.4/lib/active_record/associations/collection_proxy.rb:111:inselect' /home/lgalis/dev/New/manageiq/app/models/mixins/authentication_mixin.rb:26:in authentication_userid_passwords' /home/lgalis/dev/New/manageiq/app/models/mixins/authentication_mixin.rb:74:inauthentication_status'

Fryguy commented 9 years ago

ping @matthewd , did we miss a data migration?