Project

General

Profile

Actions

Bug #15920

closed

migration CopyUnmanagedHostsToInterfaces may fail on interface conversations when ipv6 migration has not occurred

Added by Ohad Levy almost 8 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

== 20150508124600 CopyUnmanagedHostsToInterfaces: migrating ===================
-- Migrating Unmanaged Host interfaces to standalone Interfaces
--   ... migrating li01.sat.lab.tlv.redhat.com
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined local variable or method `ip6' for #<Nic::Managed:0x0000000f4670a8>
Did you mean?  ip
               ip=
               ip?
.rvm/gems/ruby-2.3.1@foreman/gems/activemodel-4.2.6/lib/active_model/attribute_methods.rb:433:in `method_missing'
git/foreman/app/models/nic/interface.rb:94:in `normalize_ip'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:432:in `block in make_lambda'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:164:in `block in halting'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `block in call'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `each'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `call'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_validation_callbacks'
.rvm/gems/ruby-2.3.1@foreman/gems/activemodel-4.2.6/lib/active_model/validations/callbacks.rb:113:in `run_validations!'
.rvm/gems/ruby-2.3.1@foreman/gems/activemodel-4.2.6/lib/active_model/validations.rb:338:in `valid?'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/validations.rb:58:in `valid?'
git/foreman/app/models/concerns/orchestration.rb:77:in `valid?'
git/foreman/db/migrate/20150508124600_copy_unmanaged_hosts_to_interfaces.rb:27:in `block in up'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
git/foreman/db/migrate/20150508124600_copy_unmanaged_hosts_to_interfaces.rb:21:in `up'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:611:in `exec_migration'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:591:in `block in migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:590:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:768:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `block in ddl_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `ddl_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:959:in `block in migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `each'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:823:in `up'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:801:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
-e:1:in `<main>'
NameError: undefined local variable or method `ip6' for #<Nic::Managed:0x0000000f4670a8>
Did you mean?  ip
               ip=
               ip?
.rvm/gems/ruby-2.3.1@foreman/gems/activemodel-4.2.6/lib/active_model/attribute_methods.rb:433:in `method_missing'
git/foreman/app/models/nic/interface.rb:94:in `normalize_ip'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:432:in `block in make_lambda'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:164:in `block in halting'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `block in call'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `each'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `call'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_validation_callbacks'
.rvm/gems/ruby-2.3.1@foreman/gems/activemodel-4.2.6/lib/active_model/validations/callbacks.rb:113:in `run_validations!'
.rvm/gems/ruby-2.3.1@foreman/gems/activemodel-4.2.6/lib/active_model/validations.rb:338:in `valid?'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/validations.rb:58:in `valid?'
git/foreman/app/models/concerns/orchestration.rb:77:in `valid?'
git/foreman/db/migrate/20150508124600_copy_unmanaged_hosts_to_interfaces.rb:27:in `block in up'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/relation/delegation.rb:46:in `each'
git/foreman/db/migrate/20150508124600_copy_unmanaged_hosts_to_interfaces.rb:21:in `up'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:611:in `exec_migration'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:591:in `block in migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:590:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:768:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `block in ddl_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in `ddl_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:959:in `block in migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `each'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:823:in `up'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/migration.rb:801:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
.rvm/gems/ruby-2.3.1@foreman/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
.rvm/gems/ruby-2.3.1@foreman/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
-e:1:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

Related issues 2 (1 open1 closed)

Related to Foreman - Refactor #15866: Provide alternative way of migrating data as oposed misuing db:migrate for this purposeNew07/27/2016Actions
Related to Foreman - Feature #14664: Add IPv6 Subnet to Host, Hostgroup and Nic ModelsClosedTimo Goebel04/15/2016Actions
Actions

Also available in: Atom PDF