Bug 1560551

Summary: The user is asked twice to enter engine VM FQDN
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Ido Rosenzwig <irosenzw>
Component: GeneralAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.2.0CC: bugs, stirabos
Target Milestone: ovirt-4.2.2Keywords: Triaged
Target Release: 2.2.16Flags: rule-engine: ovirt-4.2+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-hosted-engine-setup-2.2.16-1.el7ev Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-18 12:24:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1458709    

Description Ido Rosenzwig 2018-03-26 12:33:56 UTC
Description of problem:
During CLI deployment the user is asked for the Engine VM FQDN (for the first time) at the 'VM configuration' phase :

"""
Please provide the FQDN you would like to use for the engine appliance.
Note: This will be the FQDN of the engine VM you are now going to launch,
it should not point to the base host or to any other existing machine.
Engine VM FQDN: (leave it empty to skip):  []:
"""

If the user leave it empty and the deployment continues, he can assume the FQDN is not needed to be provided anymore.
But at the 'Hosted Engine Configuration' phase the user is asked for the FQDN again:

"""
Please provide the FQDN for the engine you would like to use.
This needs to match the FQDN that you will use for the engine installation within the VM.
Note: This will be the FQDN of the VM you are now going to create,
it should not point to the base host or to any other existing machine.
Engine FQDN:  []:
"""

This time, the user cannot skip this question and need to provide the Engine FQDN.

The reason we ask the user twice is:
first question ('vm configuration' phase) is at cloud-init level, which can be skipped since DHCP can provide it.
second question ('hosted engine configuration' phase) is for signing of the engine's CERT.

If the first question is answered by the user the second will not appear.


In conclusion, the user MUST provide the engine FQDN at some point, so asking it twice is confusing and not necessary. 
it should be asked once.  


How reproducible:
100%

Steps to Reproduce:
1. run hosted-engine --deploy via CLI
2. do not provide any FQDN at the first 'vm configuration' phase
3. see that you are asked to provide the FQDN one more time and the 'hosted engine configuration' phase

Actual results:
asked to provide FQDN twice

Expected results:
asked only once

Comment 1 Nikolai Sednev 2018-04-11 12:48:55 UTC
        Please provide the FQDN you would like to use for the engine appliance.
          Note: This will be the FQDN of the engine VM you are now going to launch,
          it should not point to the base host or to any other existing machine.
          Engine VM FQDN:  []: 
[ ERROR ] Host name is not valid: Please specify host FQDN
          Please provide the FQDN you would like to use for the engine appliance.
          Note: This will be the FQDN of the engine VM you are now going to launch,
          it should not point to the base host or to any other existing machine.
          Engine VM FQDN:  []: 

There is no other option now, other than to provide FQDN, as it can't be skipped, moving to verified.

Works for me on these components:
rhvm-appliance-4.2-20180410.0.el7.noarch
ovirt-hosted-engine-setup-2.2.16-1.el7ev.noarch
ovirt-hosted-engine-ha-2.2.10-1.el7ev.noarch
Linux 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.5 (Maipo)

Comment 2 Sandro Bonazzola 2018-04-18 12:24:54 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

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