Project

General

Profile

Actions

Bug #1687

closed

install from dev branch with mysql adapter does not work

Added by Jason Gerry over 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

New to Foreman, I hope this helps some. Instead of just filing the bug, I have tried to work through some of the issues and I have it working in MySQL now. At least partly.

I'm building from the dev branch:

git clone https://github.com/theforeman/foreman.git -b develop

I'm getting this error trying to use MySQL as a database:

# RAILS_ENV=production bundle exec rake db:migrate
/usr/lib/ruby/gems/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:10: warning: already initialized constant ENC_NONE
/usr/lib/ruby/gems/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:11: warning: already initialized constant ENC_EUC
/usr/lib/ruby/gems/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:12: warning: already initialized constant ENC_SJIS
/usr/lib/ruby/gems/1.8/gems/ruby_parser-2.3.1/lib/ruby_parser_extras.rb:13: warning: already initialized constant ENC_UTF8
rake aborted!
undefined method `collect' for #<Mysql::Result:0x7f7c8f8e4578>

I was able to initialize the db with MySQL by doing the following:

Changed Gemfile:

# diff Gemfile Gemfile.orig 
44c44
<   gem 'ruby-mysql'
---
>   gem 'mysql'
47,49c47,49
< #group :mysql2 do
< #  gem 'mysql2', '< 0.3'
< #end
---
> group :mysql2 do
>   gem 'mysql2', '< 0.3'
> end

I also removed all other mysql gems from the bundle, I'm not sure if I would have had to that if I had started over and re-cloned the repository. This is entirely my inexperience with rails / gems / bundle I'm sure.

# bundle exec gem uninstall mysql2
# bundle exec gem uninstall mysql

then I set adapter to mysql in database.yml

production:
  adapter: mysql
  database: foreman
  username: foreman
  password: *******
  encoding: utf8
  reconnect: false
  pool: 5
  timeout: 5000
  host: localhost
  socket: /var/lib/mysql/mysql.sock

I had to explicitly set the socket since it was defaulting to looking in /tmp/, this solved the issue. I suspect this will vary by distribution? I'm running on Centos 6.2.

Another note: I had to install into an empty database, trying to run db:migrate on my puppet stored config db gave me another error:

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
==  ChangeHostBuildDefaultToFalse: migrating ==================================
-- change_column(:hosts, :build, :boolean, {:default=>false})
   -> 0.0154s
rake aborted!
An error has occurred, all later migrations canceled:

I was hoping to share the same db between puppet and foreman, according to:

http://theforeman.org/projects/foreman/wiki/Puppet_Facts

I think this should be possible but the docs aren't totally clear to me, it does say if you use the same db that facts can be shared. I am using the "storeconfigs" param in puppet.conf, also using the "thin_storeconfigs" param, maybe this only works on the full storeconfig without thin_?

I'm happy to try and more thoroughly test some of this stuff, I hope this is helpful in some way. Thanks.

Actions #1

Updated by Ohad Levy over 12 years ago

  • Category set to Rails
  • Assignee set to David Swift
  • Target version set to 1.0

fixed by upgrading to rails 3.0.15

Actions #2

Updated by Ohad Levy over 12 years ago

  • Status changed from New to Resolved
Actions #3

Updated by Lex Rivera over 12 years ago

Maybe that's related. Also trying to install with mysql, currently fails with
[pre]

AddInternalAuth: migrating ==============================================
-- add_column(:users, :password_hash, :string, {:limit=>128})
rake aborted!
An error has occurred, all later migrations canceled:

Mysql::Error: Duplicate column name 'password_hash': ALTER TABLE `users` ADD `password_hash` varchar(128)
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/mysql_adapter.rb:289:in `query'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/mysql_adapter.rb:289:in `execute'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/abstract_adapter.rb:202:in `log'
/opt/foreman/vendor/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/abstract_adapter.rb:200:in `log'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/mysql_adapter.rb:289:in `execute'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/mysql_adapter.rb:474:in `add_column'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:385:in `send'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:385:in `method_missing'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:361:in `say_with_time'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:361:in `say_with_time'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:381:in `method_missing'
/opt/foreman/db/migrate/20100628123400_add_internal_auth.rb:3:in `up_without_benchmarks'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:314:in `send'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:314:in `migrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:314:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:397:in `__send__'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:397:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:539:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:615:in `call'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:615:in `ddl_transaction'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:538:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:525:in `each'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:525:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:435:in `up'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:417:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/railties/databases.rake:151
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/bin/rake:33
/opt/foreman/vendor/ruby/1.8/bin/rake:19:in `load'
/opt/foreman/vendor/ruby/1.8/bin/rake:19
Tasks: TOP => db:migrate
[/pre]

Actions #4

Updated by Ohad Levy over 12 years ago

this does not seems related, as you have a db migration failure.

I'm not sure exactly why do you get that as it claims the db migration that was already done (or that specific db column exists), any idea why? did you had failures before / manual tweaks on the db?

Actions #5

Updated by Lex Rivera over 12 years ago

there is no manual tweaks to db. I also tried performing dropping DB and performing another migration and it fails on same step. Here is what happens on clean migration:

==  AddInternalAuth: migrating ================================================
-- add_column(:users, :password_hash, :string, {:limit=>128})
   -> 0.0046s
-- add_column(:users, :password_salt, :string, {:limit=>128})
   -> 0.0044s
rake aborted!
An error has occurred, all later migrations canceled:

changes is defined by ActiveRecord
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/attribute_methods.rb:23:in `instance_method_already_implemented?'
/opt/foreman/vendor/ruby/1.8/gems/activemodel-3.0.15/lib/active_model/attribute_methods.rb:280:in `define_attribute_methods'
/opt/foreman/vendor/ruby/1.8/gems/activemodel-3.0.15/lib/active_model/attribute_methods.rb:279:in `each'
/opt/foreman/vendor/ruby/1.8/gems/activemodel-3.0.15/lib/active_model/attribute_methods.rb:279:in `define_attribute_methods'
/opt/foreman/vendor/ruby/1.8/gems/activemodel-3.0.15/lib/active_model/attribute_methods.rb:278:in `each'
/opt/foreman/vendor/ruby/1.8/gems/activemodel-3.0.15/lib/active_model/attribute_methods.rb:278:in `define_attribute_methods'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/attribute_methods.rb:13:in `define_attribute_methods'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/attribute_methods.rb:51:in `respond_to?'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/base.rb:1874:in `populate_with_current_scope_attributes'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/base.rb:1874:in `each'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/base.rb:1874:in `populate_with_current_scope_attributes'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/base.rb:1411:in `initialize'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/reflection.rb:173:in `new'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/reflection.rb:173:in `build_association'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/associations/association_collection.rb:500:in `create_record'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/base.rb:1127:in `with_scope'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/associations/association_collection.rb:499:in `send'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/associations/association_collection.rb:499:in `create_record'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/associations/association_collection.rb:271:in `create'
/opt/foreman/vendor/ruby/1.8/gems/audited-3.0.0.rc1/lib/audited/auditor.rb:218:in `write_audit'
/opt/foreman/vendor/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:414:in `_run_audit_callbacks'
/opt/foreman/vendor/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:94:in `send'
/opt/foreman/vendor/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:94:in `run_callbacks'
/opt/foreman/vendor/ruby/1.8/gems/audited-3.0.0.rc1/lib/audited/auditor.rb:218:in `write_audit'
/opt/foreman/vendor/ruby/1.8/gems/audited-3.0.0.rc1/lib/audited/auditor.rb:200:in `audit_create'
/opt/foreman/vendor/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:424:in `_run_create_callbacks'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/callbacks.rb:277:in `create'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/persistence.rb:257:in `create_or_update'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/callbacks.rb:273:in `create_or_update'
/opt/foreman/vendor/ruby/1.8/gems/activesupport-3.0.15/lib/active_support/callbacks.rb:429:in `_run_save_callbacks'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/callbacks.rb:273:in `create_or_update'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/persistence.rb:40:in `save'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/validations.rb:43:in `save'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/transactions.rb:240:in `save'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/transactions.rb:292:in `with_transaction_returning_status'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/transactions.rb:207:in `transaction'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/transactions.rb:290:in `with_transaction_returning_status'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/transactions.rb:240:in `save'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/transactions.rb:251:in `rollback_active_record_state!'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/transactions.rb:239:in `save'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/persistence.rb:123:in `update_attribute'
/opt/foreman/db/migrate/20100628123400_add_internal_auth.rb:9:in `up_without_benchmarks'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:314:in `send'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:314:in `migrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:314:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:397:in `__send__'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:397:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:539:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:615:in `call'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:615:in `ddl_transaction'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:538:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:525:in `each'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:525:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:435:in `up'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/migration.rb:417:in `migrate'
/opt/foreman/vendor/ruby/1.8/gems/activerecord-3.0.15/lib/active_record/railties/databases.rake:151
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/opt/foreman/vendor/ruby/1.8/gems/rake-0.9.2.2/bin/rake:33
/opt/foreman/vendor/ruby/1.8/bin/rake:19:in `load'
/opt/foreman/vendor/ruby/1.8/bin/rake:19
Tasks: TOP => db:migrate

Actions #6

Updated by Ohad Levy over 12 years ago

ok, fixed in latest commit

Actions #7

Updated by Lex Rivera over 12 years ago

thanks, worked perfectly

Actions #8

Updated by pierre pham-phu almost 12 years ago

(sorry I am completely new to foreman and the ruby world so please bear with me)

I installed foreman 1.1 rc from the debian repository because I wanted to use my storeconfigs mysql db from my puppet 3.0.1 server from my foreman server using a database.yml like :

production:
  host: puppethost
  adapter: mysql
  database: puppet
  username: puppet
  password: password

unfortunately I've got the same "changes is defined by ActiveRecord" during the dbmigrate, detail :

su - foreman -s /bin/bash -c /usr/share/foreman/extras/dbmigrate
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
==  ChangeHostBuildDefaultToFalse: migrating ==================================
-- change_column(:hosts, :build, :boolean, {:default=>false})
   -> 0.0068s
rake aborted!
An error has occurred, all later migrations canceled:

changes is defined by ActiveRecord
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/attribute_methods.rb:23:in `instance_method_already_implemented?'
/usr/share/foreman/vendor/ruby/1.8/gems/activemodel-3.0.17/lib/active_model/attribute_methods.rb:280:in `define_attribute_methods'
/usr/share/foreman/vendor/ruby/1.8/gems/activemodel-3.0.17/lib/active_model/attribute_methods.rb:279:in `each'
/usr/share/foreman/vendor/ruby/1.8/gems/activemodel-3.0.17/lib/active_model/attribute_methods.rb:279:in `define_attribute_methods'
/usr/share/foreman/vendor/ruby/1.8/gems/activemodel-3.0.17/lib/active_model/attribute_methods.rb:278:in `each'
/usr/share/foreman/vendor/ruby/1.8/gems/activemodel-3.0.17/lib/active_model/attribute_methods.rb:278:in `define_attribute_methods'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/attribute_methods.rb:13:in `define_attribute_methods'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/attribute_methods.rb:51:in `respond_to?'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/base.rb:1874:in `populate_with_current_scope_attributes'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/base.rb:1874:in `each'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/base.rb:1874:in `populate_with_current_scope_attributes'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/base.rb:1411:in `initialize'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/reflection.rb:173:in `new'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/reflection.rb:173:in `build_association'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/associations/association_collection.rb:500:in `create_record'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/base.rb:1127:in `with_scope'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/associations/association_collection.rb:499:in `send'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/associations/association_collection.rb:499:in `create_record'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/associations/association_collection.rb:271:in `create'
/usr/share/foreman/vendor/ruby/1.8/gems/audited-3.0.0.rc1/lib/audited/auditor.rb:218:in `write_audit'
/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.0.17/lib/active_support/callbacks.rb:414:in `_run_audit_callbacks'
/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.0.17/lib/active_support/callbacks.rb:94:in `send'
/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.0.17/lib/active_support/callbacks.rb:94:in `run_callbacks'
/usr/share/foreman/vendor/ruby/1.8/gems/audited-3.0.0.rc1/lib/audited/auditor.rb:218:in `write_audit'
/usr/share/foreman/vendor/ruby/1.8/gems/audited-3.0.0.rc1/lib/audited/auditor.rb:206:in `audit_update'
/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.0.17/lib/active_support/callbacks.rb:415:in `_run_update_callbacks'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/callbacks.rb:281:in `update'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/persistence.rb:257:in `create_or_update'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/callbacks.rb:273:in `create_or_update'
/usr/share/foreman/vendor/ruby/1.8/gems/activesupport-3.0.17/lib/active_support/callbacks.rb:529:in `_run_save_callbacks'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/callbacks.rb:273:in `create_or_update'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/persistence.rb:40:in `save'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/validations.rb:43:in `save'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/transactions.rb:240:in `save'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/transactions.rb:292:in `with_transaction_returning_status'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/transactions.rb:207:in `transaction'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/transactions.rb:290:in `with_transaction_returning_status'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/transactions.rb:240:in `save'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/transactions.rb:251:in `rollback_active_record_state!'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/transactions.rb:239:in `save'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/persistence.rb:123:in `update_attribute'
/usr/share/foreman/db/migrate/20090916053824_change_host_build_default_to_false.rb:5:in `up_without_benchmarks'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/relation/batches.rb:21:in `find_each'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/relation/batches.rb:21:in `each'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/relation/batches.rb:21:in `find_each'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/relation/batches.rb:69:in `find_in_batches'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/relation/batches.rb:20:in `find_each'
/usr/share/foreman/db/migrate/20090916053824_change_host_build_default_to_false.rb:5:in `up_without_benchmarks'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:314:in `send'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:314:in `migrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:314:in `migrate'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:397:in `__send__'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:397:in `migrate'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:539:in `migrate'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:615:in `call'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:615:in `ddl_transaction'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:538:in `migrate'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:525:in `each'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:525:in `migrate'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:435:in `up'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/migration.rb:417:in `migrate'
/usr/share/foreman/vendor/ruby/1.8/gems/activerecord-3.0.17/lib/active_record/railties/databases.rake:151
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/task.rb:227:in `call'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/task.rb:227:in `execute'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/task.rb:222:in `each'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/task.rb:222:in `execute'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/task.rb:166:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/task.rb:159:in `invoke_with_call_chain'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/task.rb:152:in `invoke'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:141:in `invoke_task'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:99:in `top_level'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:99:in `each'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:99:in `top_level'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:108:in `run_with_threads'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:93:in `top_level'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:71:in `run'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/usr/share/foreman/vendor/ruby/1.8/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
/usr/bin/rake:28
Tasks: TOP => db:migrate

Thanks for any help !

Actions #9

Updated by Ohad Levy almost 12 years ago

please use V1.1 (currently at RC1 stage) earlier versions do no support puppet V3.

Actions #10

Updated by pierre pham-phu almost 12 years ago

I believe I used the 1.1 RC ;)

deb http://deb.theforeman.org/ squeeze rc

Actions #11

Updated by pierre pham-phu almost 12 years ago

(I am on a 32 bit debian squeeze setup if that info could be useful ...)

Actions #12

Updated by Ohad Levy almost 12 years ago

pierre pham-phu wrote:

(I am on a 32 bit debian squeeze setup if that info could be useful ...)

I would suggest to open a new bug, providing some info (like from which version you upgrade from etc)

btw: it is no longer recommended to share storeconfigs db with foreman (can work, but with limitations).

Actions

Also available in: Atom PDF