Hallo,
I just had to restore our foreman instance from it's snapshot since I ran into
a db migration issue, see below.
As I said, the snapshot is restored and I have not much else. Anything else I
should prepare for the next time? I seems this issue is unrelated to [1].
[root@foreman ~]# foreman-rake db:seed
You have 5 pending migrations:
20160725142557 AddPxeLoaderToHost
20160727142242 AddPxeLoaderToHostgroup
20160817125655 ResetOverrideParams
20160818091420 AddOverrideFlagToFilter
20160914125418 UpdateParameterPriorities
Run rake db:migrate
to update your database then try again.
[root@foreman ~]# foreman-rake db:migrate
== 20160719124942 AddMissingViewPermissions: migrating
···
======================== rake aborted! StandardError: An error has occurred, this and all later migrations canceled:undefined method override=' for #<Filter:0x00000006220190>/opt/rh/sclo-ror42/ root/usr/share/gems/gems/activemodel-4.2.5.1/lib/active_model/ attribute_methods.rb:433:in
method_missing’
/usr/share/foreman/app/models/filter.rb:216:in enforce_override_flag' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:432:in
block in make_lambda’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:164:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:164:in
block in halting’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:in
block in call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:92:in __run_callbacks__' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:778:in
_run_validation_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations/callbacks.rb:113:in run_validations!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations.rb:338:in
valid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/validations.rb:58:in valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:324:in
association_valid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:312:in block in validate_collection_association' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:312:in
each’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:312:in validate_collection_association' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:217:in
block in
define_autosave_validation_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:157:in instance_eval' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:157:in
block in
define_non_cyclic_method’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:432:in block in make_lambda' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:192:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:192:in block in simple' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in block in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:in
each’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:92:in
run_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:778:in _run_validate_callbacks' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations.rb:399:in
run_validations!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations/callbacks.rb:113:in block in run_validations!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:117:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:117:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:555:in
block (2 levels) in compile’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:505:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:505:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:92:in __run_callbacks__' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:778:in
_run_validation_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations/callbacks.rb:113:in run_validations!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations.rb:338:in
valid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/validations.rb:58:in valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/validations.rb:83:in
perform_validations’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/validations.rb:43:in save!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/attribute_methods/dirty.rb:29:in
save!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:291:in block in save!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:351:in
block in
with_transaction_returning_status’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/database_statements.rb:211:in
transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:220:in
transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:348:in with_transaction_returning_status' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:291:in
save!’
/usr/share/foreman/app/models/role.rb:140:in add_permissions!' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-7.0.0/db/ migrate/20160719124942_add_missing_view_permissions.rb:10:in
up’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:611:in exec_migration' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:592:in
block (2 levels) in migrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:591:in block in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/connection_adapters/abstract/connection_pool.rb:292:in
with_connection’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:590:in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:768:in
migrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:998:in block in execute_migration_in_transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:1044:in
block in ddl_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/database_statements.rb:213:in
block in transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/connection_adapters/abstract/transaction.rb:184:in
within_new_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/database_statements.rb:213:in
transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:220:in
transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:1044:in ddl_transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:997:in
execute_migration_in_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:959:in block in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:955:in
each’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:955:in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:823:in
up’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:801:in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/tasks/database_tasks.rb:137:in
migrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/railties/databases.rake:44:in block (2 levels) in <top (required)>' NoMethodError: undefined method
override=’ for #Filter:0x00000006220190
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/attribute_methods.rb:433:in method_missing' /usr/share/foreman/app/models/filter.rb:216:in
enforce_override_flag’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:432:in block in make_lambda' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:164:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:164:in block in halting' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in block in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:in
each’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:92:in
run_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:778:in _run_validation_callbacks' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations/callbacks.rb:113:in
run_validations!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations.rb:338:in valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/validations.rb:58:in
valid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:324:in association_valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:312:in
block in
validate_collection_association’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:312:in each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:312:in
validate_collection_association’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:217:in block in define_autosave_validation_callbacks' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/autosave_association.rb:157:in
instance_eval’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/autosave_association.rb:157:in block in define_non_cyclic_method' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:432:in
block in make_lambda’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:192:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:192:in
block in simple’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:in
block in call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:504:in each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:504:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:92:in __run_callbacks__' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:778:in
_run_validate_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations.rb:399:in run_validations!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations/callbacks.rb:113:in
block in run_validations!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:117:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:117:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:555:in block (2 levels) in compile' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:505:in
call’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:505:in call' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/ active_support/callbacks.rb:92:in
run_callbacks’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/
active_support/callbacks.rb:778:in _run_validation_callbacks' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/ active_model/validations/callbacks.rb:113:in
run_validations!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activemodel-4.2.5.1/lib/
active_model/validations.rb:338:in valid?' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/validations.rb:58:in
valid?’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/validations.rb:83:in perform_validations' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/validations.rb:43:in
save!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/attribute_methods/dirty.rb:29:in save!' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:291:in
block in save!’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:351:in block in with_transaction_returning_status' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/connection_adapters/abstract/database_statements.rb:211:in
transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:220:in transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/transactions.rb:348:in
with_transaction_returning_status’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/transactions.rb:291:in save!' /usr/share/foreman/app/models/role.rb:140:in
add_permissions!’
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-7.0.0/db/
migrate/20160719124942_add_missing_view_permissions.rb:10:in up' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:611:in
exec_migration’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:592:in block (2 levels) in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:591:in
block in migrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/connection_pool.rb:292:in
with_connection' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:590:in
migrate’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:768:in migrate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/migration.rb:998:in
block in execute_migration_in_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/migration.rb:1044:in block in ddl_transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/ active_record/connection_adapters/abstract/database_statements.rb:213:in
block in transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connection_adapters/abstract/transaction.rb:184:in
`within_new_transaction’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/
active_record/connectio