Description of problem: When running katello-reset-dbs if any process is using the db, a warning is printed to the screen, but the process continues. If you are not watching carefully it appears that all is cleared when in fact it wasn't. ** Invoke setup (first_time) ** Invoke environment (first_time) ** Execute environment ** Invoke check_db_config (first_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute check_db_config ** Invoke clear_search_indices (first_time) ** Execute clear_search_indices Search Indices cleared. ** Invoke db:migrate:reset (first_time) ** Invoke db:drop (first_time) ** Invoke db:load_config ** Execute db:drop Couldn't drop katelloschema : #<ActiveRecord::StatementInvalid: PGError: ERROR: database "katelloschema" is being accessed by other users DETAIL: There are 1 other session(s) using the database. : DROP DATABASE IF EXISTS "katelloschema"> ** Invoke db:create (first_time) ** Invoke db:load_config ** Execute db:create katelloschema_test already exists katelloschema already exists ** Invoke db:migrate (first_time) ** Invoke environment ** Execute db:migrate ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Execute db:migrate:reset ** Invoke seed_with_logging (first_time) ** Invoke db:seed (first_time) ** Invoke db:abort_if_pending_migrations (first_time) ** Invoke environment ** Execute db:abort_if_pending_migrations ** Execute db:seed ** Execute seed_with_logging ** Execute setup Database sucessfully recreated in development
FYI this is a devel only script. It's not distributed.
True, maybe it'd be a better fit in the katello project bz realm.
we are going to be dropping katello-reset-dbs and using katello-configure --reset-data instead