Bug #1615
Updated by Anonymous over 7 years ago
Versions used for puppet from yum.puppetlabs puppet-2.7.14-1.el6.noarch puppetlabs-release-6-1.noarch puppet-server-2.7.14-1.el6.noarch Versions used for foreman from jmontleon repository: foreman-0.5.1-1.el6.noarch foreman-proxy-0.5.1-1.el6.noarch Database versions: postgresql-libs-8.4.9-1.el6_1.1.x86_64 postgresql-server-8.4.9-1.el6_1.1.x86_64 postgresql-8.4.9-1.el6_1.1.x86_64 postgresql-contrib-8.4.9-1.el6_1.1.x86_64 What i did: * Installed postgresql-rpms * Installed puppet-rpms * Installed foreman-rpms with all rubygem-depenendcies (including rubygem-pg) * Configured puppet to use puppetstore and a postgresql database storeconfigs = true reports = foreman, store, log dbadapter = postgresql dbuser = puppet dbpassword = <highsecurepassword> dbserver = localhost dbname = puppetstore * Configure foreman to use the database production: adapter: postgresql database: puppetstore username: puppet password: <highsecurepassword> host: localhost * Create Database createdb puppetstore * Configure pg_hba.conf host puppetstore puppet 217.196.144.70/32 md5 * Run a puppet agent --no-daemonize --onetime --debug on the puppetmaster/foreman host => Puppet creates all kind of tables: NOTICE: CREATE TABLE will create implicit sequence "resources_id_seq" for serial column "resources.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "resources_pkey" for table "resources" NOTICE: CREATE TABLE will create implicit sequence "source_files_id_seq" for serial column "source_files.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "source_files_pkey" for table "source_files" NOTICE: CREATE TABLE will create implicit sequence "resource_tags_id_seq" for serial column "resource_tags.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "resource_tags_pkey" for table "resource_tags" NOTICE: CREATE TABLE will create implicit sequence "puppet_tags_id_seq" for serial column "puppet_tags.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "puppet_tags_pkey" for table "puppet_tags" NOTICE: CREATE TABLE will create implicit sequence "hosts_id_seq" for serial column "hosts.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "hosts_pkey" for table "hosts" NOTICE: CREATE TABLE will create implicit sequence "fact_names_id_seq" for serial column "fact_names.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fact_names_pkey" for table "fact_names" NOTICE: CREATE TABLE will create implicit sequence "fact_values_id_seq" for serial column "fact_values.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fact_values_pkey" for table "fact_values" NOTICE: CREATE TABLE will create implicit sequence "param_values_id_seq" for serial column "param_values.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "param_values_pkey" for table "param_values" NOTICE: CREATE TABLE will create implicit sequence "param_names_id_seq" for serial column "param_names.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "param_names_pkey" for table "param_names" NOTICE: CREATE TABLE will create implicit sequence "inventory_nodes_id_seq" for serial column "inventory_nodes.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "inventory_nodes_pkey" for table "inventory_nodes" * initialize foreman: * cd /usr/share/foreman && RAILS_ENV=production rake db:migrate --trace RAILS_ENV=production rake db:migrate --trace Libvirt binding are missing - hypervisor management is disabled /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 ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == CreateHosts: migrating ==================================================== -- add_column(:hosts, :mac, :string, {:limit=>17, :default=>""}) -> 0.0010s -- add_column(:hosts, :sp_mac, :string, {:limit=>17, :default=>""}) -> 0.0007s -- add_column(:hosts, :sp_ip, :string, {:limit=>15, :default=>""}) -> 0.0007s -- add_column(:hosts, :sp_name, :string, {:default=>""}) -> 0.0007s -- add_column(:hosts, :root_pass, :string, {:limit=>64}) -> 0.0004s -- add_column(:hosts, :serial, :string, {:limit=>12}) -> 0.0006s -- add_column(:hosts, :puppetmaster, :string) -> 0.0004s -- add_column(:hosts, :puppet_status, :integer, {:null=>false, :default=>0}) -> 0.0036s -- add_column(:hosts, :domain_id, :integer) -> 0.0004s -- add_column(:hosts, :architecture_id, :integer) -> 0.0004s -- add_column(:hosts, :operatingsystem_id, :integer) -> 0.0003s -- add_column(:hosts, :environment_id, :integer) -> 0.0003s -- add_column(:hosts, :subnet_id, :integer) -> 0.0004s -- add_column(:hosts, :sp_subnet_id, :integer) -> 0.0003s -- add_column(:hosts, :ptable_id, :integer) -> 0.0004s -- add_column(:hosts, :medium_id, :integer) -> 0.0003s -- add_column(:hosts, :build, :boolean, {:default=>true}) -> 0.0007s -- add_column(:hosts, :comment, :text) -> 0.0003s -- add_column(:hosts, :disk, :text) -> 0.0004s -- add_column(:hosts, :installed_at, :datetime) -> 0.0004s == CreateHosts: migrated (0.0153s) =========================================== == AddAuditsTable: migrating ================================================= -- create_table(:audits, {:force=>true}) NOTICE: CREATE TABLE will create implicit sequence "audits_id_seq" for serial column "audits.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "audits_pkey" for table "audits" -> 0.0067s -- add_index(:audits, [:auditable_id, :auditable_type], {:name=>"auditable_index"}) -> 0.0026s -- add_index(:audits, [:user_id, :user_type], {:name=>"user_index"}) -> 0.0031s -- add_index(:audits, :created_at) -> 0.0038s -- add_index(:audits, [:auditable_parent_id, :auditable_parent_type], {:name=>"auditable_parent_index"}) -> 0.0039s == AddAuditsTable: migrated (0.0205s) ======================================== == CreateArchitectures: migrating ============================================ -- create_table(:architectures) NOTICE: CREATE TABLE will create implicit sequence "architectures_id_seq" for serial column "architectures.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "architectures_pkey" for table "architectures" -> 0.0044s -- create_table(:architectures_operatingsystems, {:id=>false}) -> 0.0007s == CreateArchitectures: migrated (0.0053s) =================================== == CreateMedia: migrating ==================================================== -- create_table(:media) NOTICE: CREATE TABLE will create implicit sequence "media_id_seq" for serial column "media.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "media_pkey" for table "media" -> 0.0041s == CreateMedia: migrated (0.0192s) =========================================== == CreateDomains: migrating ================================================== -- create_table(:domains) NOTICE: CREATE TABLE will create implicit sequence "domains_id_seq" for serial column "domains.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "domains_pkey" for table "domains" -> 0.0058s == CreateDomains: migrated (0.0059s) ========================================= == CreateSubnets: migrating ================================================== -- create_table(:subnets) NOTICE: CREATE TABLE will create implicit sequence "subnets_id_seq" for serial column "subnets.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "subnets_pkey" for table "subnets" -> 0.0161s == CreateSubnets: migrated (0.0162s) ========================================= == CreateOperatingsystems: migrating ========================================= -- create_table(:operatingsystems) NOTICE: CREATE TABLE will create implicit sequence "operatingsystems_id_seq" for serial column "operatingsystems.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "operatingsystems_pkey" for table "operatingsystems" -> 0.0037s == CreateOperatingsystems: migrated (0.0038s) ================================ == CreateModels: migrating =================================================== -- create_table(:models) NOTICE: CREATE TABLE will create implicit sequence "models_id_seq" for serial column "models.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "models_pkey" for table "models" -> 0.0054s -- add_column(:hosts, :model_id, :integer) -> 0.0004s == CreateModels: migrated (0.0060s) ========================================== == CreateEnvironments: migrating ============================================= -- create_table(:environments) NOTICE: CREATE TABLE will create implicit sequence "environments_id_seq" for serial column "environments.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "environments_pkey" for table "environments" -> 0.0035s -- create_table(:environments_puppetclasses, {:id=>false}) -> 0.0007s == CreateEnvironments: migrated (0.0044s) ==================================== == CreateReports: migrating ================================================== -- create_table(:reports) NOTICE: CREATE TABLE will create implicit sequence "reports_id_seq" for serial column "reports.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "reports_pkey" for table "reports" -> 0.0060s == CreateReports: migrated (0.0061s) ========================================= == CreatePtables: migrating ================================================== -- create_table(:ptables) NOTICE: CREATE TABLE will create implicit sequence "ptables_id_seq" for serial column "ptables.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "ptables_pkey" for table "ptables" -> 0.0057s -- create_table(:operatingsystems_ptables, {:id=>false}) -> 0.0009s == CreatePtables: migrated (0.0180s) ========================================= == CreatePuppetclasses: migrating ============================================ -- create_table(:puppetclasses) NOTICE: CREATE TABLE will create implicit sequence "puppetclasses_id_seq" for serial column "puppetclasses.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "puppetclasses_pkey" for table "puppetclasses" -> 0.0075s -- create_table(:hosts_puppetclasses, {:id=>false}) -> 0.0009s -- create_table(:operatingsystems_puppetclasses, {:id=>false}) -> 0.0007s == CreatePuppetclasses: migrated (0.0094s) =================================== == CreateParameters: migrating =============================================== -- create_table(:parameters) NOTICE: CREATE TABLE will create implicit sequence "parameters_id_seq" for serial column "parameters.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "parameters_pkey" for table "parameters" -> 0.0064s == CreateParameters: migrated (0.0065s) ====================================== == CreateAuthSources: migrating ============================================== -- create_table(:auth_sources) NOTICE: CREATE TABLE will create implicit sequence "auth_sources_id_seq" for serial column "auth_sources.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "auth_sources_pkey" for table "auth_sources" -> 0.0129s == CreateAuthSources: migrated (0.0130s) ===================================== == CreateHostgroups: migrating =============================================== -- create_table(:hostgroups) NOTICE: CREATE TABLE will create implicit sequence "hostgroups_id_seq" for serial column "hostgroups.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "hostgroups_pkey" for table "hostgroups" -> 0.0039s -- create_table(:hostgroups_puppetclasses, {:id=>false}) -> 0.0008s -- add_column(:hosts, :hostgroup_id, :integer) -> 0.0004s -- add_column(:parameters, :hostgroup_id, :integer) -> 0.0004s == CreateHostgroups: migrated (0.0059s) ====================================== == AddTypeToParameter: migrating ============================================= -- add_column(:parameters, :type, :string) -> 0.0005s == AddTypeToParameter: migrated (0.0006s) ==================================== == AddDomainToParameter: migrating =========================================== -- add_column(:parameters, :domain_id, :integer) -> 0.0004s == AddDomainToParameter: migrated (0.0005s) ================================== == ChangeReportFieldTypeToText: migrating ==================================== == ChangeReportFieldTypeToText: migrated (0.0001s) =========================== == ChangeHostBuildDefaultToFalse: migrating ================================== -- change_column(:hosts, :build, :boolean, {:default=>false}) -> 0.0101s rake aborted! An error has occurred, this and all later migrations canceled: changes is defined by ActiveRecord /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:23:in `instance_method_already_implemented?' /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:280:in `define_attribute_methods' /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:279:in `each' /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:279:in `define_attribute_methods' /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:278:in `each' /usr/lib/ruby/gems/1.8/gems/activemodel-3.0.10/lib/active_model/attribute_methods.rb:278:in `define_attribute_methods' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:13:in `define_attribute_methods' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods.rb:51:in `respond_to?' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:1874:in `populate_with_current_scope_attributes' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:1874:in `each' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:1874:in `populate_with_current_scope_attributes' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:1411:in `initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/reflection.rb:173:in `new' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/reflection.rb:173:in `build_association' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/associations/association_collection.rb:500:in `create_record' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:1127:in `with_scope' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/associations/association_collection.rb:499:in `send' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/associations/association_collection.rb:499:in `create_record' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/associations/association_collection.rb:271:in `create' /usr/lib/ruby/gems/1.8/gems/acts_as_audited-2.0.0/lib/acts_as_audited/auditor.rb:218:in `write_audit' /usr/lib/ruby/gems/1.8/gems/acts_as_audited-2.0.0/lib/acts_as_audited/auditor.rb:206:in `audit_update' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:415:in `_run_update_callbacks' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/callbacks.rb:281:in `update' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/persistence.rb:257:in `create_or_update' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/callbacks.rb:273:in `create_or_update' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:514:in `_run_save_callbacks' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/callbacks.rb:273:in `create_or_update' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/persistence.rb:40:in `save' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/validations.rb:43:in `save' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods/dirty.rb:21:in `save' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:240:in `save' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:292:in `with_transaction_returning_status' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:290:in `with_transaction_returning_status' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:240:in `save' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:251:in `rollback_active_record_state!' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:239:in `save' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/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/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/relation/batches.rb:21:in `find_each' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/relation/batches.rb:21:in `each' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/relation/batches.rb:21:in `find_each' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/relation/batches.rb:69:in `find_in_batches' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/relation/batches.rb:20:in `find_each' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:446:in `__send__' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:446:in `find_each' /usr/share/foreman/db/migrate/20090916053824_change_host_build_default_to_false.rb:5:in `up_without_benchmarks' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:314:in `send' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:314:in `migrate' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:314:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:397:in `__send__' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:397:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:539:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:613:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:613:in `ddl_transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:613:in `ddl_transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:538:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:525:in `each' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:525:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:435:in `up' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/migration.rb:417:in `migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/railties/databases.rake:151 /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute' /usr/lib/ruby/gems/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' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/bin/rake:33 /usr/bin/rake:19:in `load' /usr/bin/rake:19 Tasks: TOP => db:migrate The other way round seems to be ok