Project

General

Profile

Bug #24664

rake db:create fails to initialize with Katello with Rails 5.2

Added by Ivan Necas over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Database
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

It ends up with:

10:58:58 ActiveRecord::NoDatabaseError: FATAL:  database "test_develop_pr_katello-0-dev" does not exist
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:688:in `rescue in connect'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:683:in `connect'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:215:in `initialize'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:40:in `new'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:40:in `postgresql_connection'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:809:in `new_connection'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `checkout_new_connection'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:832:in `try_to_checkout_new_connection'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:793:in `acquire_connection'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:521:in `checkout'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:380:in `connection'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:1008:in `retrieve_connection'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:118:in `retrieve_connection'
10:58:58 /usr/local/rvm/gems/ruby-2.4.3@test_develop_pr_katello-0/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:90:in `connection'
10:58:58 /var/lib/workspace/workspace/test_develop_pr_katello@2/database/postgresql/ruby/2.4/slave/fast/plugin/engines/bastion_katello/lib/bastion_katello/engine.rb:13:in `block in <class:Engine>'

Associated revisions

Revision 78a7ee16 (diff)
Added by Ivan Necas over 1 year ago

Fixes #24664 - ensure not to use database during db preparation

Rails 5.2 started initializing rails environment during
the db:create phase, leading the bastion initializtion code to fail with

database "test_develop_pr_katello-0-dev" does not exist

History

#1 Updated by The Foreman Bot over 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7639 added

#2 Updated by Ivan Necas over 1 year ago

  • Status changed from Ready For Testing to Closed

#3 Updated by Andrew Kofink over 1 year ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.9.0

Also available in: Atom PDF