Bug 1458019 - Embedded Ansible role claims to be activated but ERROR in evm.log
Summary: Embedded Ansible role claims to be activated but ERROR in evm.log
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Nick Carboni
QA Contact: luke couzens
URL:
Whiteboard: ansible_embed
Depends On:
Blocks: 1517817
TreeView+ depends on / blocked
 
Reported: 2017-06-01 19:07 UTC by Jerome Marc
Modified: 2019-02-11 13:53 UTC (History)
7 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1517817 (view as bug list)
Environment:
Last Closed: 2019-02-11 13:53:27 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jerome Marc 2017-06-01 19:07:14 UTC
Description of problem:
I get the following message as notification: 'The role Embedded Ansible has been activated on server cf45_config1'. However, there is an error in the evm.log and it worker keeps trying to restart in a loop.

[----] E, [2017-06-01T15:03:35.154238 #3457:a0941b0] ERROR -- : [URI::InvalidComponentError]: bad component(expected host component): cf45_confi
g1.mbu.labs.redhat.com  Method:[rescue in do_before_work_loop]
[----] E, [2017-06-01T15:03:35.154326 #3457:a0941b0] ERROR -- : /opt/rh/rh-ruby23/root/usr/share/ruby/uri/generic.rb:595:in `check_host'
/opt/rh/rh-ruby23/root/usr/share/ruby/uri/generic.rb:636:in `host='
/opt/rh/rh-ruby23/root/usr/share/ruby/uri/generic.rb:670:in `hostname='
/opt/rh/rh-ruby23/root/usr/share/ruby/uri/generic.rb:189:in `initialize'
/opt/rh/rh-ruby23/root/usr/share/ruby/uri/generic.rb:136:in `new'
/opt/rh/rh-ruby23/root/usr/share/ruby/uri/generic.rb:136:in `build'
/opt/rh/rh-ruby23/root/usr/share/ruby/uri/http.rb:63:in `build'
/var/www/miq/vmdb/app/models/embedded_ansible_worker/runner.rb:46:in `update_embedded_ansible_provider'
/var/www/miq/vmdb/app/models/embedded_ansible_worker/runner.rb:14:in `do_before_work_loop'
/var/www/miq/vmdb/app/models/embedded_ansible_worker/runner.rb:7:in `prepare'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:129:in `start'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:21:in `start_worker'
/var/www/miq/vmdb/app/models/embedded_ansible_worker.rb:10:in `block in start_runner'

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

How reproducible:
Always

Steps to Reproduce:
1. Enable Ansible role

Actual results:
ERROR in evm.log and invalid notification.

Expected results:
No ERROR or at least a correct notification.

Additional info:

Comment 2 Gregg Tanzillo 2017-06-01 22:13:41 UTC
It looks like the issue here is that the hostname "cf45_config1" is invalid because it contains an underscore character. I think that hostname may work in some places but not everywhere.

Comment 3 Jerome Marc 2017-06-02 21:37:33 UTC
Changing the name to 'cf45-config1' instead of 'cf45_config1' seems to make the worker start. However, the main reason for this BZ is that the notification claims the role is started whereas this is not the case. The notification should occur once the role start is validated.

Comment 4 Yuri Rudman 2017-06-16 16:45:03 UTC
Setting priority to medium since invalid host name was the original issue for this BZ.

Comment 6 CFME Bot 2017-11-20 23:16:34 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/6c6d66acc86cb26d89a3f64c414f12679c9aa043

commit 6c6d66acc86cb26d89a3f64c414f12679c9aa043
Author:     Nick Carboni <ncarboni>
AuthorDate: Mon Nov 20 17:33:47 2017 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Mon Nov 20 17:33:47 2017 -0500

    Move the notifications to include more of the setup
    
    Things can go wrong while setting up the default objects and
    setting up the provider.
    
    We should wait until all of this work is done before creating the
    notification that says that the role has been successfully enabled.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1458019

 app/models/embedded_ansible_worker/runner.rb       |  6 +-
 spec/models/embedded_ansible_worker/runner_spec.rb | 72 +++++++++++-----------
 2 files changed, 39 insertions(+), 39 deletions(-)

Comment 7 Nick Carboni 2017-11-21 14:08:20 UTC
After the fix, we should not raise the "completed" notification if something related to setting up the provider fails.

Comment 9 luke couzens 2018-06-20 11:54:57 UTC
Verified in 5.10.0.1


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