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:
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.
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.
Setting priority to medium since invalid host name was the original issue for this BZ.
https://github.com/ManageIQ/manageiq/pull/16508
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(-)
After the fix, we should not raise the "completed" notification if something related to setting up the provider fails.
Verified in 5.10.0.1