Actions
Bug #24698
closeddatabase "test_plugin_matrix-3-dev" does not exist when using `RemoteExecutionFeature.register` with Rails 5.2
Difficulty:
Triaged:
No
Description
We've seen this in jenkins in rake db:create. It's connected to the way how Rails 5.2 initializes the environment even in db:create. I was not able to fully reproduce it locally, but the backtrace should be enough to solve the issue.
ActiveRecord::NoDatabaseError: FATAL: database "test_plugin_matrix-3-dev" does not exist 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:688:in `rescue in connect' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:683:in `connect' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:215:in `initialize' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:40:in `new' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:40:in `postgresql_connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:809:in `new_connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:853:in `checkout_new_connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:832:in `try_to_checkout_new_connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:793:in `acquire_connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:521:in `checkout' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:380:in `connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:1008:in `retrieve_connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:118:in `retrieve_connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/connection_handling.rb:90:in `connection' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/activerecord-5.2.0/lib/active_record/model_schema.rb:324:in `table_exists?' 15:57:51 /usr/local/rvm/gems/ruby-2.5.1@test_plugin_matrix-3/gems/foreman_remote_execution-1.6.1/app/models/remote_execution_feature.rb:27:in `register' 15:57:51 /var/lib/workspace/workspace/test_plugin_matrix@2/database/postgresql/ruby/2.5/slave/fast/plugin/lib/foreman_ansible/remote_execution.rb:16:in `register_rex_feature'
Updated by Ivan Necas almost 6 years ago
- Related to Tracker #21834: Rails 5.2 upgrade tasks added
Updated by The Foreman Bot almost 6 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman_remote_execution/pull/372 added
Updated by Ivan Necas almost 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_plugin|72d35d9d602f881b519d9643b89f995ff10dcb4c.
Updated by Ivan Necas almost 6 years ago
- Fixed in Releases foreman_remote_execution 1.6.2 (Foreman 1.20) added
Updated by Marek Hulán almost 6 years ago
- Related to Bug #24910: Feature registration does not reliably work in seed tests added
Actions