Project

General

Profile

Actions

Bug #12669

closed

undefined method `lookup_value_matcher=' for hostgroup

Added by Nicolas Di Gregorio over 8 years ago. Updated over 5 years ago.

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

Description

Hello,

I recently upgraded my foreman from 1.8 to 1.10 on a red hat 6 system. After upgrading the rpms, I run foreman-rake db:migrate and I get the following issue:
[root@myhost log]# foreman-rake db:migrate
MigratePtablesToTemplates: migrating ====================================
-- foreign_keys("operatingsystems_ptables")
> 0.0073s
-
remove_foreign_key("operatingsystems_ptables", {:name=>"operatingsystems_ptables_ptable_id_fk"})
> 0.0011s
-
foreign_keys("hostgroups")
> 0.0031s
-
remove_foreign_key("hostgroups", {:name=>"hostgroups_ptable_id_fk"})
> 0.0008s
-
foreign_keys("hosts")
> 0.0031s
-
remove_foreign_key("hosts", {:name=>"hosts_ptable_id_fk"})
> 0.0008s
-
add_column(:templates, :os_family, :string)
> 0.0007s
-
migrating partition table AutoYaST entire SCSI disk
-- migrating partition table AutoYaST entire virtual disk
-- migrating partition table AutoYaST LVM
-- migrating partition table FreeBSD
-- migrating partition table Jumpstart default
-- migrating partition table Jumpstart mirrored
-- migrating partition table Kickstart default
rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `lookup_value_matcher=' for #<Hostgroup:0x000000074c6c90>

Tasks: TOP => db:migrate
(See full trace by running task with --trace)
[root@myhost log]# foreman-rake db:migrate --trace
  • Invoke db:migrate (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Invoke db:load_config (first_time)
  • Execute db:load_config
  • Execute db:migrate
    MigratePtablesToTemplates: migrating ====================================
    -- foreign_keys("operatingsystems_ptables")
    > 0.0070s
    -
    remove_foreign_key("operatingsystems_ptables", {:name=>"operatingsystems_ptables_ptable_id_fk"})
    > 0.0011s
    -
    foreign_keys("hostgroups")
    > 0.0031s
    -
    remove_foreign_key("hostgroups", {:name=>"hostgroups_ptable_id_fk"})
    > 0.0008s
    -
    foreign_keys("hosts")
    > 0.0031s
    -
    remove_foreign_key("hosts", {:name=>"hosts_ptable_id_fk"})
    > 0.0008s
    -
    add_column(:templates, :os_family, :string)
    > 0.0007s
    -
    migrating partition table AutoYaST entire SCSI disk
    -- migrating partition table AutoYaST entire virtual disk
    -- migrating partition table AutoYaST LVM
    -- migrating partition table FreeBSD
    -- migrating partition table Jumpstart default
    -- migrating partition table Jumpstart mirrored
    -- migrating partition table Kickstart default
    rake aborted!
    An error has occurred, this and all later migrations canceled:

undefined method `lookup_value_matcher=' for #<Hostgroup:0x000000074c5d68>
/opt/rh/ruby193/root/usr/share/gems/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing'
/usr/share/foreman/app/models/concerns/host_common.rb:213:in `set_lookup_value_matcher'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:539:in `_run__902747676752302698__save__1356416459048176174__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:84:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:50:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:240:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/has_many_association.rb:16:in `insert_record'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/autosave_association.rb:348:in `block in save_collection_association'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/autosave_association.rb:337:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/autosave_association.rb:337:in `save_collection_association'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/autosave_association.rb:191:in `block in add_autosave_association_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/autosave_association.rb:161:in `instance_eval'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/autosave_association.rb:161:in `block in define_non_cyclic_method'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:409:in `_run__2463367946491758309__create__1356416459048176174__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_create_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:268:in `create'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:347:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `block in create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run__2463367946491758309__save__1356416459048176174__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:104:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `save!'
/usr/share/foreman/db/migrate/20150514114044_migrate_ptables_to_templates.rb:39:in `block in up'
/usr/share/foreman/db/migrate/20150514114044_migrate_ptables_to_templates.rb:30:in `each'
/usr/share/foreman/db/migrate/20150514114044_migrate_ptables_to_templates.rb:30:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in `block (2 levels) in migrate'
/opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:280:in `measure'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in `block in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:123:in `with_connection'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:389:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:528:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `block in ddl_transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `ddl_transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:719:in `block in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:570:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:551:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:153:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => db:migrate

I cannot login anymore to the foreman web interface. Sounds like a strange error, because I upgraded other hosts the same way with any issue. How can I fix this?


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #11425: add a real primary key to host and hostgroup for lookup_values has_manyClosedTom Caspy08/19/2015Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Category set to DB migrations
  • translation missing: en.field_release deleted (63)

Upgrades between multiple releases aren't supported, please do upgrade to 1.9 before attempting an upgrade to 1.10: http://theforeman.org/manuals/1.10/index.html#3.6Upgrade

This is a potentially fixable bug, so I'll leave this open anyway.

Actions #2

Updated by Dominic Cleal over 8 years ago

Sorry, to be more precise - the issue is because it's attempting a 1.9 migration (#7096) that's changing hosts, but using installed 1.10 code that's dependent on a later 1.10 migration (#11425). Upgrading stage by stage ought to work.

Actions #3

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #11425: add a real primary key to host and hostgroup for lookup_values has_many added
Actions #4

Updated by Nicolas Di Gregorio over 8 years ago

So I was able to downgrade, upgrade to 1.9 and then to 1.10 and it's working properly.

Thanks for the hint.

Kind regards

Actions #5

Updated by Ohad Levy about 8 years ago

  • Assignee set to Ori Rabin
Actions #6

Updated by Jeff Sault about 8 years ago

Is there any kind of workaround for this besides downgrading/upgrading? Even if its just a bit of SQL? It seems to be data related - the problem doesnt occur on all upgrades. We are upgrading from 1.8.4 to 1.10.1

Actions #7

Updated by Dominic Cleal about 8 years ago

Unsetting any partition tables from host groups should prevent it, e.g. UPDATE hostgroups SET ptable_id=NULL; and then re-associate them after.

The essence of that migration is that partition tables are moving from the "ptables" table to the "templates" table, so their IDs will change and it's attempting to reassign them. You'll probably want to make a note of which host groups are associated to which partition table names (not IDs!) to fix them after.

Actions #8

Updated by Jeff Sault about 8 years ago

Nope, still getting an error, even when that column is null for all HGs...

foreman=# select count(*) from hostgroups where ptable_id is not null;
count
-------
0

  1. foreman-rake --trace db:migrate
    • Invoke db:migrate (first_time)
    • Invoke environment (first_time)
    • Execute environment
    • Invoke db:load_config (first_time)
    • Execute db:load_config
    • Execute db:migrate
      MigratePtablesToTemplates: migrating ====================================
      -- foreign_keys("operatingsystems_ptables")
      > 0.0080s
      -
      remove_foreign_key("operatingsystems_ptables", {:name=>"operatingsystems_ptables_ptable_id_fk"})
      > 0.0012s
      -
      foreign_keys("hostgroups")
      > 0.0034s
      -
      remove_foreign_key("hostgroups", {:name=>"hostgroups_ptable_id_fk"})
      > 0.0009s
      -
      foreign_keys("hosts")
      > 0.0035s
      -
      remove_foreign_key("hosts", {:name=>"hosts_ptable_id_fk"})
      > 0.0009s
      -
      add_column(:templates, :os_family, :string)
      > 0.0008s
      -
      migrating partition table AutoYaST entire SCSI disk
      -- migrating partition table AutoYaST entire virtual disk
      -- migrating partition table AutoYaST LVM
      -- migrating partition table FreeBSD
      -- migrating partition table Jumpstart default
      -- migrating partition table Jumpstart mirrored
      -- migrating partition table Kickstart default
      rake aborted!
      An error has occurred, this and all later migrations canceled:

undefined method `lookup_value_matcher=' for #<Host::Managed:0x0000000956e538>
/opt/rh/ruby193/root/usr/share/gems/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing'
/usr/share/foreman/app/models/concerns/host_common.rb:217:in `set_lookup_value_matcher'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in `_run__3756520210968163504__save__181820919057131946__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:84:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:50:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:241:in `block in save'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:240:in `save'
/usr/share/foreman/app/models/concerns/foreman/sti.rb:29:in `save_with_type'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:184:in `update_attribute'
/usr/share/foreman/db/migrate/20150514114044_migrate_ptables_to_templates.rb:46:in `block (2 levels) in up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `method_missing'
/usr/share/foreman/db/migrate/20150514114044_migrate_ptables_to_templates.rb:45:in `block in up'
/usr/share/foreman/db/migrate/20150514114044_migrate_ptables_to_templates.rb:30:in `each'
/usr/share/foreman/db/migrate/20150514114044_migrate_ptables_to_templates.rb:30:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in `block (2 levels) in migrate'
/opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:280:in `measure'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in `block in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:123:in `with_connection'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:389:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:528:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `block in ddl_transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `ddl_transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:719:in `block in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:570:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:551:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:153:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => db:migrate

Actions #9

Updated by Dominic Cleal about 8 years ago

Slightly different error there, it's now on hosts - probably even trickier to fix, as every provisioned host will probably have a ptable_id set.

Actions #10

Updated by Jeff Sault about 8 years ago

Would doing the same thing for hosts get around the problem or am I fighting a losing battle here?

Actions #11

Updated by Dominic Cleal about 8 years ago

Should work, yep.

Actions #12

Updated by Jeff Sault about 8 years ago

Not having much luck with this so decided to rollback to 1.8 then upgrade to 1.9 then 1.10.

Is there an existing issue for this? IMHO this is a bug, a user should be able to upgrade from any version, rather on relying on them updating through all versions sequentially.

Actions #13

Updated by Dominic Cleal about 8 years ago

This ticket tracks the bug, it's still open.

Actions #14

Updated by Dominic Cleal about 8 years ago

  • Assignee deleted (Ori Rabin)
  • translation missing: en.field_release set to 123
Actions #15

Updated by Tom Caspy about 8 years ago

  • Assignee set to Tom Caspy

this bug is insanely cool! I'm taking it!

Actions #16

Updated by The Foreman Bot about 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3132 added
Actions #17

Updated by Tom Caspy about 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF