Project

General

Profile

Bug #15920

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

Added by Ohad Levy almost 5 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
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

Related to Foreman - Refactor #15866: Provide alternative way of migrating data as oposed misuing db:migrate for this purposeNew2016-07-27
Related to Foreman - Feature #14664: Add IPv6 Subnet to Host, Hostgroup and Nic ModelsClosed2016-04-15

History

#1 Updated by Marek Hulán almost 5 years ago

  • Related to Refactor #15866: Provide alternative way of migrating data as oposed misuing db:migrate for this purpose added

#2 Updated by Dominic Cleal almost 5 years ago

  • Related to Feature #14664: Add IPv6 Subnet to Host, Hostgroup and Nic Models added

#3 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 160

#4 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 160 to 190

#5 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 190 to 203

#6 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) changed from 203 to 207

#7 Updated by Dominic Cleal over 4 years ago

  • Status changed from New to Rejected
  • Legacy Backlogs Release (now unused) deleted (207)

Closing as upgrades across multiple major versions are not supported (particularly one this old), Foreman's database migrations are not developed or tested to work this way.

Also available in: Atom PDF