Bug 1395182 - rake evm:start no longer starts the postgres service
Summary: rake evm:start no longer starts the postgres service
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: cfme-future
Assignee: Gregg Tanzillo
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-15 11:08 UTC by Jan Krocil
Modified: 2016-11-18 22:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-18 13:44:24 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)

Description Jan Krocil 2016-11-15 11:08:11 UTC
Description of problem:
SSIA

Version-Release number of selected component (if applicable):
5.7.0.10

How reproducible:
always

Steps to Reproduce:
1. systemctl stop evmserverd
2. systemctl stop rh-postgresql95-postgresql
3. vmdb
4. rake evm:start (same as systemctl start evmserverd except the error is printed to stdout)

Actual results:
Starting EVM...
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `initialize'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `new'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:671:in `connect'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:217:in `initialize'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `new'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:721:in `new_connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:765:in `checkout_new_connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:744:in `try_to_checkout_new_connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:705:in `acquire_connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:501:in `checkout'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:364:in `connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:875:in `retrieve_connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_handling.rb:128:in `retrieve_connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/connection_handling.rb:91:in `connection'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/model_schema.rb:354:in `load_schema!'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/attributes.rb:233:in `load_schema!'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/attribute_decorators.rb:28:in `load_schema!'
/var/www/miq/vmdb/lib/extensions/ar_virtual.rb:387:in `load_schema!'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/model_schema.rb:349:in `load_schema'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/model_schema.rb:256:in `columns_hash'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/core.rb:192:in `block in find_by'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/core.rb:192:in `each'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/core.rb:192:in `all?'
/opt/rh/cfme-gemset/gems/activerecord-5.0.0.1/lib/active_record/core.rb:192:in `find_by'
/var/www/miq/vmdb/app/models/miq_server.rb:528:in `block in <class:MiqServer>'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-module.rb:37:in `block (2 levels) in cache_with_timeout'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-module.rb:25:in `block in cache_with_timeout'
/var/www/miq/vmdb/app/models/miq_server/worker_management.rb:14:in `kill_all_workers'
/var/www/miq/vmdb/lib/tasks/evm_application.rb:21:in `start'
/var/www/miq/vmdb/lib/tasks/evm.rake:8:in `block (2 levels) in <top (required)>'
Tasks: TOP => evm:start
(See full trace by running task with --trace)


Expected results:
The rake task starts the database service if it's not running yet.

Additional info:
I'm not sure what the expectations are for CFME 5.7 but it used to work in the past - feel free to close if this has changed with 5.7.

Comment 2 Nick Carboni 2016-11-18 13:44:24 UTC
This behavior was removed intentionally in https://github.com/ManageIQ/manageiq/pull/10775 because it was using some ambiguous logic to determine where the database was supposed to be running which was causing issues with HA setups and containerized appliances.

Also, I think there is some value in logically separating the database from the application; as we move more towards containerization and general separation of responsibilities throughout our app I think we are going to move the application logic away from managing external services like the database.


Note You need to log in before you can comment on or make changes to this bug.