Bug 1385791

Summary: Invalid auto-generated self-hosted engine hostname
Product: Red Hat Quickstart Cloud Installer Reporter: Tasos Papaioannou <tpapaioa>
Component: WebUIAssignee: cchase
Status: CLOSED ERRATA QA Contact: Tasos Papaioannou <tpapaioa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.1CC: cchase, jmatthew, qci-bugzillas
Target Milestone: ---Keywords: Triaged
Target Release: 1.1   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-28 01:40:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tasos Papaioannou 2016-10-17 17:08:47 UTC
Description of problem:

The auto-generated self-hosted engine hostname is invalid if the deployment label contains more than one underscore.

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

QCI-1.1-RHEL-7-20161013.t.0

How reproducible:

100%

Steps to Reproduce:
1.) Create a RHV self-hosted deployment with a name containing more than one hyphen, e.g., "rhv-self-hosted".

2.) On Engine/Hypervisor tab, see invalid auto-generated hostname:

rhv-self_hosted-rhev-engine

3.) Select a discovered host, and verify that the Next button is disabled, with no apparent errors/warnings.

4.) Verify that changing the underscores to hyphens resolves the issue.

Actual results:

Self-hosted engine hostname has invalid underscores.

Expected results:

No underscores in engine hostname, Next button is enabled after selecting a host.

Additional info:

In ./ui/app/assets/javascripts/fusor_ui/fusor-ember-cli.js, replace('_', '-') is called on the deployment label:

      if (deployment.get('isNotStarted') && _ember['default'].isEmpty(deployment.get('rhev_self_hosted_engine_hostname')) && _ember['default'].isPresent(deployment.get('label'))) {
        var dasherizedLabel = deployment.get('label').trim().replace('_', '-');
        deployment.set('rhev_self_hosted_engine_hostname', dasherizedLabel + '-rhev-engine');
      }

replace('_', '-') only replaces the first occurrence of '_'. To replace all underscores, replace(/_/g, '-') should be used instead.

Comment 2 Tasos Papaioannou 2016-10-17 17:44:11 UTC
Also, '-rhev-engine' should probably be changed to '-rhv-engine', to reflect the change in product name as of RHV 4.0.

Comment 3 cchase 2016-10-17 18:11:14 UTC
https://github.com/fusor/fusor/pull/1270

Comment 4 John Matthews 2016-11-22 13:38:24 UTC
Expected in 11/21 ISO

Comment 5 Tasos Papaioannou 2016-11-22 17:39:11 UTC
Verified on QCI-1.1-RHEL-7-20161121.t.0.

Comment 8 errata-xmlrpc 2017-02-28 01:40:10 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/RHEA-2017:0335