Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
== 20141223101707 CreateDiscoveryAttributeSets: migrating =====================
-- create_table(:discovery_attribute_sets)
-> 0.0016s
-- add_index(:discovery_attribute_sets, :host_id)
-> 0.0005s
-- add_foreign_key("discovery_attribute_sets", "hosts", {:name=>"discovery_attribute_sets_host_id_fk"})
-> 0.0000s
== 20141223101707 CreateDiscoveryAttributeSets: migrated (0.0023s) ============
== 20141223142759 FillDiscoveryAttributeSetsForExistingHosts: migrating =======
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
wrong number of arguments (0 for 1..2)/home/ohad/git/foreman_discovery/app/models/host/discovered.rb:78:in `populate_fields_from_facts'
/home/ohad/git/foreman_discovery/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb:3:in `block in up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/home/ohad/git/foreman_discovery/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb:3:in `up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:611:in `exec_migration'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:591:in `block in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:590:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:768:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `block in ddl_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `ddl_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:959:in `block in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `each'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:823:in `up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:801:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
ArgumentError: wrong number of arguments (0 for 1..2)
/home/ohad/git/foreman_discovery/app/models/host/discovered.rb:78:in `populate_fields_from_facts'
/home/ohad/git/foreman_discovery/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb:3:in `block in up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/home/ohad/git/foreman_discovery/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb:3:in `up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:611:in `exec_migration'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:591:in `block in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:590:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:768:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `block in ddl_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `ddl_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:959:in `block in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `each'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:823:in `up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:801:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
➜ foreman git:(rails42) ✗ RAILS_ENV=production rake db:migrate git:(rails42↑99|…
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
== 20141223142759 FillDiscoveryAttributeSetsForExistingHosts: migrating =======
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
ERF42-4154 [Foreman::Exception]: Unable to detect primary interface using MAC '' specified by discovery_fact 'discovery_bootif'/home/ohad/git/foreman_discovery/app/services/foreman_discovery/fact_parser.rb:9:in `suggested_primary_interface'
/home/ohad/git/foreman/app/models/host/base.rb:198:in `set_interfaces'
/home/ohad/git/foreman/app/models/host/base.rb:181:in `populate_fields_from_facts'
/home/ohad/git/foreman_discovery/app/models/host/discovered.rb:80:in `populate_fields_from_facts'
/home/ohad/git/foreman_discovery/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb:3:in `block in up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/home/ohad/git/foreman_discovery/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb:3:in `up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:611:in `exec_migration'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:591:in `block in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:590:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:768:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `block in ddl_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `ddl_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:959:in `block in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `each'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:823:in `up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:801:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
Foreman::Exception: ERF42-4154 [Foreman::Exception]: Unable to detect primary interface using MAC '' specified by discovery_fact 'discovery_bootif'
/home/ohad/git/foreman_discovery/app/services/foreman_discovery/fact_parser.rb:9:in `suggested_primary_interface'
/home/ohad/git/foreman/app/models/host/base.rb:198:in `set_interfaces'
/home/ohad/git/foreman/app/models/host/base.rb:181:in `populate_fields_from_facts'
/home/ohad/git/foreman_discovery/app/models/host/discovered.rb:80:in `populate_fields_from_facts'
/home/ohad/git/foreman_discovery/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb:3:in `block in up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
/home/ohad/git/foreman_discovery/db/migrate/20141223142759_fill_discovery_attribute_sets_for_existing_hosts.rb:3:in `up'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:611:in `exec_migration'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:591:in `block in migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:590:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:768:in `migrate'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `block in ddl_transaction'
/home/ohad/.rvm/gems/ruby-2.2.3@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.