Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1272604 - evmserverd service is enabled on first boot
Summary: evmserverd service is enabled on first boot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.5.0
Assignee: Nick Carboni
QA Contact: Jan Krocil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-16 21:16 UTC by Nick Carboni
Modified: 2015-12-08 13:39 UTC (History)
4 users (show)

Fixed In Version: 5.5.0.8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 13:39:20 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Description Nick Carboni 2015-10-16 21:16:14 UTC
Description of problem:
On the first boot of an appliance, no database is configured which in turn means that there is no config/database.yml file.
When the evmserverd service (rails app) starts it blows up because that file is necessary.

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

How reproducible:
Always

Steps to Reproduce:
1. Boot
2.
3.

Actual results:
Many backtraces in /var/log/messages (about one every 3 seconds as systemd tries to get the service to start)

Expected results:
The application should hold off on starting until a database disk is configured

Additional info:
Backtrace:

Oct 16 17:14:43 new-host systemd: Starting EVM server daemon...
Oct 16 17:14:46 new-host sh: /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/application/configuration.rb:110:in `database_configuration': Cannot load `Rails.application.database_configuration`: (RuntimeError)
Oct 16 17:14:46 new-host sh: Could not load database configuration. No such file - ["config/database.yml"]
Oct 16 17:14:46 new-host sh: from /var/www/miq/vmdb/config/environments/patches/database_configuration.rb:15:in `database_configuration'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activerecord-4.2.4/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:Railtie>'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:27:in `each'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activerecord-4.2.4/lib/active_record/railtie.rb:116:in `block in <class:Railtie>'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:226:in `block in tsort_each'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:429:in `each_strongly_connected_component_from'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:347:in `block in each_strongly_connected_component'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:345:in `each'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:345:in `call'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:345:in `each_strongly_connected_component'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:224:in `tsort_each'
Oct 16 17:14:46 new-host sh: from /opt/rh/rh-ruby22/root/usr/share/ruby/tsort.rb:203:in `tsort_each'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/railtie.rb:194:in `public_send'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/railtie.rb:194:in `method_missing'
Oct 16 17:14:46 new-host sh: from /var/www/miq/vmdb/config/environment.rb:5:in `<top (required)>'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/application.rb:328:in `require_environment!'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/commands/runner.rb:52:in `<top (required)>'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:123:in `require'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:90:in `runner'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
Oct 16 17:14:46 new-host sh: from /opt/rh/cfme-gemset/gems/railties-4.2.4/lib/rails/commands.rb:17:in `<top (required)>'
Oct 16 17:14:46 new-host sh: from /var/www/miq/vmdb/script/rails:6:in `require'
Oct 16 17:14:46 new-host sh: from /var/www/miq/vmdb/script/rails:6:in `<main>'
Oct 16 17:14:46 new-host systemd: evmserverd.service: control process exited, code=exited status=1
Oct 16 17:14:46 new-host systemd: Failed to start EVM server daemon.
Oct 16 17:14:46 new-host systemd: Unit evmserverd.service entered failed state.
Oct 16 17:14:46 new-host systemd: evmserverd.service holdoff time over, scheduling restart.
Oct 16 17:14:46 new-host systemd: Stopping EVM server daemon...

Comment 2 Nick Carboni 2015-10-19 21:33:52 UTC
The fix for this would be for the evmserverd service to be disabled by default on downstream appliances.

That way we could enable and start(?) the service only when the database has been successfully created.

Comment 3 Nick Carboni 2015-10-20 12:54:12 UTC
https://github.com/ManageIQ/manageiq/pull/4989

Comment 4 CFME Bot 2015-10-20 16:55:17 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7321142247a523d062a248e1a37862e2f8f1e06f

commit 7321142247a523d062a248e1a37862e2f8f1e06f
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Tue Oct 20 08:52:10 2015 -0400
Commit:     Nick Carboni <ncarboni@redhat.com>
CommitDate: Tue Oct 20 11:01:04 2015 -0400

    Enable and start the evmserverd service after the database is configured
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1272604

 gems/pending/appliance_console/database_configuration.rb           | 1 +
 gems/pending/spec/appliance_console/database_configuration_spec.rb | 4 ++++
 2 files changed, 5 insertions(+)

Comment 11 CFME Bot 2015-10-21 21:32:59 UTC
New commit detected on ManageIQ/manageiq-appliance-build/master:
https://github.com/ManageIQ/manageiq-appliance-build/commit/029b53619225cfec48e12c4df413d31df843ea42

commit 029b53619225cfec48e12c4df413d31df843ea42
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Tue Oct 20 16:04:38 2015 -0400
Commit:     Nick Carboni <ncarboni@redhat.com>
CommitDate: Tue Oct 20 16:04:38 2015 -0400

    Remove the line that enables evmserverd
    
    The service will be enabled and started after the database is configured
    by the changes in https://github.com/ManageIQ/manageiq/pull/4989
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1272604

 kickstarts/partials/post/systemd.ks.erb | 1 -
 1 file changed, 1 deletion(-)

Comment 14 errata-xmlrpc 2015-12-08 13:39:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551


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