Bug 740539 - PGError: ERROR: relation "pool_families_provider_accounts" does not exist in rails.log
Summary: PGError: ERROR: relation "pool_families_provider_accounts" does not exist in...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Angus Thomas
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-22 12:03 UTC by Aziza Karol
Modified: 2012-01-26 12:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-13 13:49:22 UTC


Attachments (Terms of Use)

Description Aziza Karol 2011-09-22 12:03:24 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.install aeolus.
2.check rails.log
#tail -f /var/log/aeolus-conductor/rails.log 
FROM pg_class seq,
 pg_attribute attr,
 pg_depend dep,
 pg_namespace name,
 pg_constraint cons
 WHERE seq.oid = dep.objid
 AND seq.relkind = 'S'
 AND attr.attrelid = dep.refobjid
 AND attr.attnum = dep.refobjsubid
 AND attr.attrelid = cons.conrelid
 AND attr.attnum = cons.conkey[1]
 AND cons.contype = 'p'
 AND dep.refobjid = '"pool_families_provider_accounts"'::regclass
^[[0m
PGError: ERROR:  relation "pool_families_provider_accounts" does not exist
LINE 14:             AND dep.refobjid      = '"pool_families_provider...
                                             ^
:           SELECT attr.attname, seq.relname
          FROM pg_class      seq,
               pg_attribute  attr,
               pg_depend     dep,
               pg_namespace  name,
               pg_constraint cons
          WHERE seq.oid           = dep.objid



Additional info:
[root@dell-pesc440-01 templates]# rpm -qa | grep aeolus
aeolus-conductor-doc-0.4.0-0.20110921152740gitac47a38.fc15.noarch
aeolus-conductor-daemons-0.4.0-0.20110921152740gitac47a38.fc15.noarch
rubygem-aeolus-image-0.1.0-3.20110919115936gitd1d24b4.fc15.noarch
aeolus-configure-2.0.2-4.20110921102958gitcaa9608.fc15.noarch
aeolus-conductor-0.4.0-0.20110921152740gitac47a38.fc15.noarch
aeolus-all-0.4.0-0.20110921152740gitac47a38.fc15.noarch
[root@dell-pesc440-01 templates]# rpm -qa | grep imagefactory
imagefactory-0.6.2-1.fc15.noarch
rubygem-imagefactory-console-0.5.0-4.20110824113238gitd9debef.fc15.noarch
[root@dell-pesc440-01 templates]#

Comment 1 wes hayutin 2011-09-22 13:49:33 UTC
recreated..


  ESC[1mESC[36mSQL (0.5ms)ESC[0m  ESC[1mSHOW client_min_messagesESC[0m
  ESC[1mESC[35mSQL (0.1ms)ESC[0m  SET client_min_messages TO 'panic'
  ESC[1mESC[36mSQL (0.1ms)ESC[0m  ESC[1mSET standard_conforming_strings = onESC[0m
  ESC[1mESC[35mSQL (0.1ms)ESC[0m  SET client_min_messages TO 'notice'
  ESC[1mESC[36mSQL (0.4ms)ESC[0m  ESC[1mSET time zone 'UTC'ESC[0m
  ESC[1mESC[35mSQL (0.1ms)ESC[0m  SHOW TIME ZONE
  ESC[1mESC[36mPK and serial sequence (1.9ms)ESC[0m  ESC[1m SELECT attr.attname, seq.relname
 FROM pg_class seq,
 pg_attribute attr,
 pg_depend dep,
 pg_namespace name,
 pg_constraint cons
 WHERE seq.oid = dep.objid
 AND seq.relkind = 'S'
 AND attr.attrelid = dep.refobjid
 AND attr.attnum = dep.refobjsubid
 AND attr.attrelid = cons.conrelid
 AND attr.attnum = cons.conkey[1]
 AND cons.contype = 'p'
 AND dep.refobjid = '"pool_families_provider_accounts"'::regclass
ESC[0m
PGError: ERROR:  relation "pool_families_provider_accounts" does not exist
LINE 14:             AND dep.refobjid      = '"pool_families_provider...
                                             ^
:           SELECT attr.attname, seq.relname
          FROM pg_class      seq,
               pg_attribute  attr,
               pg_depend     dep,
               pg_namespace  name,
               pg_constraint cons
          WHERE seq.oid           = dep.objid
            AND seq.relkind       = 'S'
            AND attr.attrelid     = dep.refobjid
            AND attr.attnum       = dep.refobjsubid
            AND attr.attrelid     = cons.conrelid
            AND attr.attnum       = cons.conkey[1]
            AND cons.contype      = 'p'
            AND dep.refobjid      = '"pool_families_provider_accounts"'::regclass

  ESC[1mESC[35mSQL (2.9ms)ESC[0m   SELECT COUNT(*)
 FROM pg_tables
rails.log

Comment 2 Mike Orazi 2011-09-22 13:51:09 UTC
This appears to be happening on clean box install, directly after
aeolus-configure as soon as thin starts up.

Comment 3 wes hayutin 2011-09-28 16:37:59 UTC
making sure all the bugs are at the right version for future queries

Comment 5 Jan Provaznik 2011-10-13 13:49:22 UTC
I think all we can do is ignore this error. It's caused by activerecord, but it's harmless: when has_and_belongs_to_many association is used, then AR queries database when a model is loaded (IOW rails app is started or rake task is executed) and checks if join table doesn't have primary key. If table doesn't exist or primary key is not found it's OK, it continues in execution, logged db error is side-effect.

Closing this bug as there is nothing we can fix.

Here is a link where it's described too:
https://github.com/rails/rails/issues/1973

check  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/associations.rb, method create_has_and_belongs_to_many_reflection for more details.

here is the backtrace for the PG ERROR log:
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/connection_adapters/abstract_adapter.rb:200:in `log'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:501:in `query'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:755:in `pk_and_sequence_for'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/connection_adapters/postgresql_adapter.rb:802:in `primary_key'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/associations.rb:1806:in `create_has_and_belongs_to_many_reflection'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/associations.rb:1411:in `has_and_belongs_to_many'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/autosave_association.rb:137:in `has_and_belongs_to_many'
  /usr/share/aeolus-conductor/app/models/provider_account.rb:45
  /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
  /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:227:in `load_dependency'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:346:in `require_or_load'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:491:in `load_missing_constant'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:183:in `const_missing'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `each'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:181:in `const_missing'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:113:in `constantize'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:112:in `each'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/inflector/methods.rb:112:in `constantize'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/core_ext/string/inflections.rb:43:in `constantize'
  /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.9/lib/active_model/observing.rb:182:in `observed_class'
  /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.9/lib/active_model/observing.rb:175:in `observed_classes'
  /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.9/lib/active_model/observing.rb:195:in `observed_classes'
  /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.9/lib/active_model/observing.rb:191:in `initialize'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/observer.rb:94:in `initialize'
  /usr/lib/ruby/1.8/singleton.rb:94:in `new'
  /usr/lib/ruby/1.8/singleton.rb:94:in `instance'
  /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.9/lib/active_model/observing.rb:66:in `instantiate_observer'
  /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.9/lib/active_model/observing.rb:39:in `instantiate_observers'
  /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.9/lib/active_model/observing.rb:39:in `each'
  /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.9/lib/active_model/observing.rb:39:in `instantiate_observers'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/railtie.rb:83
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
  /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.9/lib/active_record/railtie.rb:82
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:34:in `call'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:43:in `run_load_hooks'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:42:in `each'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application/finisher.rb:46
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `instance_exec'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:25:in `run'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:50:in `run_initializers'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `each'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:49:in `run_initializers'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:134:in `initialize!'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:77:in `send'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:77:in `method_missing'
  /usr/share/aeolus-conductor/config/environment.rb:25
  /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `gem_original_require'
  /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:53:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in `new_constants_in'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in `load_dependency'
  /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:103:in `require_environment!'
  /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:218:in `initialize_tasks'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
  /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in `invoke_prerequisites'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
  /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
  /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
  /usr/bin/rake:19:in `load'
  /usr/bin/rake:19


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