Bug #36942
openUnable to enable back puppet plugin again after completely purging the puppet plugin and related stuff
Description
If we have used "foreman-maintain plugin purge-puppet -f" to disable puppet plugin , It has invoked "foreman-rake purge:puppet" and attempted to delete the required tables\columns\migrations.
But we cannot enable back the plugin and installer is not able to find all required tables or table relations to make it work.
The very first step it fails is on the db:migrate i.e.
2022-05-17 04:45:47 [NOTICE] [configure] 1250 configuration steps out of 2097 steps complete.
2022-05-17 04:46:39 [ERROR ] [configure] '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
2022-05-17 04:46:39 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: change from 'notrun' to ['0'] failed: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
2022-05-17 04:47:04 [NOTICE] [configure] 1500 configuration steps out of 2097 steps complete.
2022-05-17 04:47:08 [NOTICE] [configure] 1750 configuration steps out of 2901 steps complete.
...
- /usr/sbin/foreman-rake db:migrate
20121018152459 CreateHostgroupClasses: migrating =========================
-- rename_table(:hostgroups_puppetclasses, :hostgroup_classes)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedTable: ERROR: relation "hostgroups_puppetclasses" does not exist
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `async_exec'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.4.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `block (2 levels) in execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.4.7/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
For more details and the detailed investigation done, please refer to https://bugzilla.redhat.com/show_bug.cgi?id=2087067
Updated by The Foreman Bot almost 1 year ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/9918 added