Please help - upgrade Foreman 1.10 to 1.13 has failed

The OS

  • Oracle Linux 7 :3.8.13-118.13.2.el7uek.x86_64 #2 SMP Wed Oct 5
    11:03:41 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux
  • All latest updates as of today

The 'yum update' was successful - i.e. NO yum errors, etc…but then host
was accidentally rebooted.

After reboot Wbe GUI did not start and below migrate step has failed.

# foreman-rake db:migrate

== 20151104100257 AddHostsCountToHostgroup: migrating

··· ========================= -- add_column(:hostgroups, :hosts_count, :integer, {:default=>0}) -> 0.0086s rake aborted! StandardError: An error has occurred, this and all later migrations canceled:

undefined method counter_cache_column' for nil:NilClass/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:38:inblock in reset_counters’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in
each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:inreset_counters’
/usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5:in
block in up' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:ineach’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in
each' /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:4:inup’
/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:inblock (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:inwith_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:inmigrate’
/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:inblock 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:inwithin_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:intransaction’
/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:inexecute_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:ineach’
/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:inup’
/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:inmigrate’
/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 methodcounter_cache_column’ for nil:NilClass
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:38:in
block in reset_counters' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:ineach’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in
reset_counters' /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5:inblock in up’
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in
each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:ineach’
/usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:4:in
up' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/migration.rb:611:inexec_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:inblock 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:inmigrate’
/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:inblock 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:inblock 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:intransaction’
/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:inddl_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:inblock 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:inmigrate’
/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:inmigrate’
/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:inblock (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

foreman-rake db:seed

You have 32 pending migrations:
20151104100257 AddHostsCountToHostgroup
20151120153254 DeleteBootableInterface
20151210143537 AddTypeToMailNotification
20151220093801 RemoveSpacesFromSmartVariableKey
20160201131211 AddExpiredLogsToSmartProxy
20160203110216 AddDefaultValueForBookmarkPublicField
20160215143900 AddSubnetDomainRelationConstraints
20160225115638 RemoveDefaultUserRole
20160225131917 RenameAnonymousRole
20160228140111 UpdateParamsPriority
20160307120453 RemoveHostgroupsCountFromPuppetclasses
20160308102459 RemovePermissionsFromRoles
20160317070258 AddViewParamsToFiltersWithEdit
20160404074723 DowncaseDisplayTypes
20160414063050 AddStiToSubnets
20160415134454 AddIpv6ToHosts
20160415135858 AddIpv6Subnet
20160516070529 DivideLookupKeyPermissions
20160527093031 LimitOsDescription
20160609092110 RemoveNilFromMergeOverride
20160616074718 RemoveHostCounterCache
20160626085636 RemovePuppetCounters
20160715131352 SetRoleBuiltinDefault
20160717125402 UnifyPermissions
20160719081324 ChangeTemplatesTypeDefault
20160719095445 ChangeTemplateTaxableTaxonomiesType
20160719100624 ChangeTemplateAuditsType
20160725142557 AddPxeLoaderToHost
20160727142242 AddPxeLoaderToHostgroup
20160817125655 ResetOverrideParams
20160818091420 AddOverrideFlagToFilter
20160914125418 UpdateParameterPriorities

··· On Friday, October 21, 2016 at 5:03:09 PM UTC-7, Evgeny Vasilchenko wrote: > > The OS > > - Oracle Linux 7 :3.8.13-118.13.2.el7uek.x86_64 #2 SMP Wed Oct 5 > 11:03:41 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux > - All latest updates as of today > > The 'yum update' was successful - i.e. NO yum errors, etc..but then host > was accidentally rebooted. > > After reboot Wbe GUI did not start and below migrate step has failed. > > *# foreman-rake db:migrate* > > == 20151104100257 AddHostsCountToHostgroup: migrating > ========================= > -- add_column(:hostgroups, :hosts_count, :integer, {:default=>0}) > -> 0.0086s > rake aborted! > StandardError: An error has occurred, this and all later migrations > canceled: > > > undefined method `counter_cache_column' for > nil:NilClass/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:38:in > `block in reset_counters' > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in > `each' > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in > `reset_counters' > /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5:in > `block in up' > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in > `each' > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in > `each' > /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:4: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 ' > NoMethodError: undefined method `counter_cache_column' for nil:NilClass > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:38:in > `block in reset_counters' > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in > `each' > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in > `reset_counters' > /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5:in > `block in up' > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in > `each' > /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in > `each' > /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:4: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 ' > Tasks: TOP => db:migrate > (See full trace by running task with --trace) >

Please anyone? Any suggestions beside of 1.10 backup restore?

··· On Friday, October 21, 2016 at 5:03:45 PM UTC-7, Evgeny Vasilchenko wrote: > > *foreman-rake db:seed* > > You have 32 pending migrations: > 20151104100257 AddHostsCountToHostgroup > 20151120153254 DeleteBootableInterface > 20151210143537 AddTypeToMailNotification > 20151220093801 RemoveSpacesFromSmartVariableKey > 20160201131211 AddExpiredLogsToSmartProxy > 20160203110216 AddDefaultValueForBookmarkPublicField > 20160215143900 AddSubnetDomainRelationConstraints > 20160225115638 RemoveDefaultUserRole > 20160225131917 RenameAnonymousRole > 20160228140111 UpdateParamsPriority > 20160307120453 RemoveHostgroupsCountFromPuppetclasses > 20160308102459 RemovePermissionsFromRoles > 20160317070258 AddViewParamsToFiltersWithEdit > 20160404074723 DowncaseDisplayTypes > 20160414063050 AddStiToSubnets > 20160415134454 AddIpv6ToHosts > 20160415135858 AddIpv6Subnet > 20160516070529 DivideLookupKeyPermissions > 20160527093031 LimitOsDescription > 20160609092110 RemoveNilFromMergeOverride > 20160616074718 RemoveHostCounterCache > 20160626085636 RemovePuppetCounters > 20160715131352 SetRoleBuiltinDefault > 20160717125402 UnifyPermissions > 20160719081324 ChangeTemplatesTypeDefault > 20160719095445 ChangeTemplateTaxableTaxonomiesType > 20160719100624 ChangeTemplateAuditsType > 20160725142557 AddPxeLoaderToHost > 20160727142242 AddPxeLoaderToHostgroup > 20160817125655 ResetOverrideParams > 20160818091420 AddOverrideFlagToFilter > 20160914125418 UpdateParameterPriorities > > > On Friday, October 21, 2016 at 5:03:09 PM UTC-7, Evgeny Vasilchenko wrote: >> >> The OS >> >> - Oracle Linux 7 :3.8.13-118.13.2.el7uek.x86_64 #2 SMP Wed Oct 5 >> 11:03:41 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux >> - All latest updates as of today >> >> The 'yum update' was successful - i.e. NO yum errors, etc..but then host >> was accidentally rebooted. >> >> After reboot Wbe GUI did not start and below migrate step has failed. >> >> *# foreman-rake db:migrate* >> >> == 20151104100257 AddHostsCountToHostgroup: migrating >> ========================= >> -- add_column(:hostgroups, :hosts_count, :integer, {:default=>0}) >> -> 0.0086s >> rake aborted! >> StandardError: An error has occurred, this and all later migrations >> canceled: >> >> >> undefined method `counter_cache_column' for >> nil:NilClass/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:38:in >> `block in reset_counters' >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in >> `each' >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in >> `reset_counters' >> /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5:in >> `block in up' >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in >> `each' >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in >> `each' >> /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:4: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 ' >> NoMethodError: undefined method `counter_cache_column' for nil:NilClass >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:38:in >> `block in reset_counters' >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in >> `each' >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in >> `reset_counters' >> /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5:in >> `block in up' >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in >> `each' >> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in >> `each' >> /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:4: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 ' >> Tasks: TOP => db:migrate >> (See full trace by running task with --trace) >> >

Ok… I realize that everyone are busy - so, I'll rephrase my request:

We would like to* urgently hire a Foreman expert *to recover a crashed
instance of Foreman 13.x
Please contact me via email or +1 (778) 328-7592

Thank you!

··· On Monday, October 24, 2016 at 10:06:03 AM UTC-7, Evgeny Vasilchenko wrote: > > Please anyone? Any suggestions beside of 1.10 backup restore? > > On Friday, October 21, 2016 at 5:03:45 PM UTC-7, Evgeny Vasilchenko wrote: >> >> *foreman-rake db:seed* >> >> You have 32 pending migrations: >> 20151104100257 AddHostsCountToHostgroup >> 20151120153254 DeleteBootableInterface >> 20151210143537 AddTypeToMailNotification >> 20151220093801 RemoveSpacesFromSmartVariableKey >> 20160201131211 AddExpiredLogsToSmartProxy >> 20160203110216 AddDefaultValueForBookmarkPublicField >> 20160215143900 AddSubnetDomainRelationConstraints >> 20160225115638 RemoveDefaultUserRole >> 20160225131917 RenameAnonymousRole >> 20160228140111 UpdateParamsPriority >> 20160307120453 RemoveHostgroupsCountFromPuppetclasses >> 20160308102459 RemovePermissionsFromRoles >> 20160317070258 AddViewParamsToFiltersWithEdit >> 20160404074723 DowncaseDisplayTypes >> 20160414063050 AddStiToSubnets >> 20160415134454 AddIpv6ToHosts >> 20160415135858 AddIpv6Subnet >> 20160516070529 DivideLookupKeyPermissions >> 20160527093031 LimitOsDescription >> 20160609092110 RemoveNilFromMergeOverride >> 20160616074718 RemoveHostCounterCache >> 20160626085636 RemovePuppetCounters >> 20160715131352 SetRoleBuiltinDefault >> 20160717125402 UnifyPermissions >> 20160719081324 ChangeTemplatesTypeDefault >> 20160719095445 ChangeTemplateTaxableTaxonomiesType >> 20160719100624 ChangeTemplateAuditsType >> 20160725142557 AddPxeLoaderToHost >> 20160727142242 AddPxeLoaderToHostgroup >> 20160817125655 ResetOverrideParams >> 20160818091420 AddOverrideFlagToFilter >> 20160914125418 UpdateParameterPriorities >> >> >> On Friday, October 21, 2016 at 5:03:09 PM UTC-7, Evgeny Vasilchenko wrote: >>> >>> The OS >>> >>> - Oracle Linux 7 :3.8.13-118.13.2.el7uek.x86_64 #2 SMP Wed Oct 5 >>> 11:03:41 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux >>> - All latest updates as of today >>> >>> The 'yum update' was successful - i.e. NO yum errors, etc..but then host >>> was accidentally rebooted. >>> >>> After reboot Wbe GUI did not start and below migrate step has failed. >>> >>> *# foreman-rake db:migrate* >>> >>> == 20151104100257 AddHostsCountToHostgroup: migrating >>> ========================= >>> -- add_column(:hostgroups, :hosts_count, :integer, {:default=>0}) >>> -> 0.0086s >>> rake aborted! >>> StandardError: An error has occurred, this and all later migrations >>> canceled: >>> >>> >>> undefined method `counter_cache_column' for >>> nil:NilClass/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:38:in >>> `block in reset_counters' >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in >>> `each' >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in >>> `reset_counters' >>> /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5:in >>> `block in up' >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in >>> `each' >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in >>> `each' >>> /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:4: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 ' >>> NoMethodError: undefined method `counter_cache_column' for nil:NilClass >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:38:in >>> `block in reset_counters' >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in >>> `each' >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/counter_cache.rb:22:in >>> `reset_counters' >>> /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:5:in >>> `block in up' >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in >>> `each' >>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in >>> `each' >>> /usr/share/foreman/db/migrate/20151104100257_add_hosts_count_to_hostgroup.rb:4: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 ' >>> Tasks: TOP => db:migrate >>> (See full trace by running task with --trace) >>> >>

I think there's a few points here:

  1. Oracle Linux isn't officially supported - that's probably not the
    problem, but it's worth remembering
  2. If the system crashed during a db:migrate (which is called by the
    packages during upgrade) then it's could well be in an inconsistent state
  3. Direct upgrades skipping major releases are known to break - the
    migrations care what version of the code they invoke.

Of these, I suspect (3) is your issue. A undefined method suggests that
you've skipped a major version - assuming you have backups, your best
option is a rollback followed by a 1.10->1.11->1.12->1.13 upgrade.

Good luck!
Greg

··· On 24 October 2016 at 18:06, Evgeny Vasilchenko < evgeny.vasilchenko@gmail.com> wrote:

Please anyone? Any suggestions beside of 1.10 backup restore?

We have no back up of this VM due to stupid coincidence of various factors.
A backup did exists, but was accidentally overwritten by a newer version. :frowning:

I'm sure situation is not that bad - Foreman even sends audit email me to
once a day.
Need to figure out what can be done to database if anything.

I just have no time to fix this now, but company is okay to hire an expert
and try to fix it.
I can deploy 1.13 from scratch, but just recovering all customization done
in Foreman is a bit of pain.

Thanks!

··· On Tuesday, October 25, 2016 at 11:08:25 AM UTC-7, Greg Sutcliffe wrote: > > On 24 October 2016 at 18:06, Evgeny Vasilchenko > wrote: > >> Please anyone? Any suggestions beside of 1.10 backup restore? >> > > I think there's a few points here: > > 1) Oracle Linux isn't officially supported - that's probably not the > problem, but it's worth remembering > 2) If the system crashed during a db:migrate (which is called by the > packages during upgrade) then it's could well be in an inconsistent state > 3) Direct upgrades skipping major releases are known to break - the > migrations care what version of the code they invoke. > > Of these, I suspect (3) is your issue. A undefined method suggests that > you've skipped a major version - assuming you have backups, your best > option is a rollback followed by a 1.10->1.11->1.12->1.13 upgrade. > > Good luck! > Greg >

Its not the actual database thats the issue, its that the code is too new
(the first pending migration is in 1.11 - see [1]).

One possibility is to grab a new VM, install 1.11 and point it at the
production db and then run foreman-rake db:migrate. If that works, you
can do the same with a 1.12 setup, and then run the 1.13 migrations on your
production box.

Good luck!
Greg

··· On 25 October 2016 at 20:05, Evgeny Vasilchenko < evgeny.vasilchenko@gmail.com> wrote:

I’m sure situation is not that bad - Foreman even sends audit email me to
once a day.
Need to figure out what can be done to database if anything.

Thanks a lot, Greg - I will try.

··· On Tuesday, October 25, 2016 at 12:54:17 PM UTC-7, Greg Sutcliffe wrote: > > On 25 October 2016 at 20:05, Evgeny Vasilchenko > wrote: > >> I'm sure situation is not that bad - Foreman even sends audit email me to >> once a day. >> Need to figure out what can be done to database if anything. >> > > Its not the actual database thats the issue, its that the code is too new > (the first pending migration is in 1.11 - see [1]). > > One possibility is to grab a new VM, install 1.11 and point it at the > production db and then run `foreman-rake db:migrate`. If that works, you > can do the same with a 1.12 setup, and then run the 1.13 migrations on your > production box. > > Good luck! > Greg >

I have recovered The Foreman 1.13 following your advises.
Thanks a lot Greg!

··· On Tuesday, October 25, 2016 at 11:50:58 PM UTC-7, Evgeny Vasilchenko wrote: > > Thanks a lot, Greg - I will try. > > On Tuesday, October 25, 2016 at 12:54:17 PM UTC-7, Greg Sutcliffe wrote: >> >> On 25 October 2016 at 20:05, Evgeny Vasilchenko >> wrote: >> >>> I'm sure situation is not that bad - Foreman even sends audit email me >>> to once a day. >>> Need to figure out what can be done to database if anything. >>> >> >> Its not the actual database thats the issue, its that the code is too new >> (the first pending migration is in 1.11 - see [1]). >> >> One possibility is to grab a new VM, install 1.11 and point it at the >> production db and then run `foreman-rake db:migrate`. If that works, you >> can do the same with a 1.12 setup, and then run the 1.13 migrations on your >> production box. >> >> Good luck! >> Greg >> >

Great! For future reference - one major version upgrade at a time :slight_smile:

Greg

··· On 27 October 2016 at 01:33, Evgeny Vasilchenko < evgeny.vasilchenko@gmail.com> wrote: > > I have recovered The Foreman 1.13 following your advises. > Thanks a lot Greg!

That's what I was doing all the time until 1.10 :))

··· On Wednesday, October 26, 2016 at 5:41:34 PM UTC-7, Greg Sutcliffe wrote: > > On 27 October 2016 at 01:33, Evgeny Vasilchenko > wrote: > > > > I have recovered The Foreman 1.13 following your advises. > > Thanks a lot Greg! > > Great! For future reference - one major version upgrade at a time :) > > Greg >