Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1568312

Summary: Ansible deploy of HE failed with error "Please specify host FQDN" when using an answer file
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Kobi Hakimi <khakimi>
Component: GeneralAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED NOTABUG QA Contact: meital avital <mavital>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 2.2.16CC: bugs, khakimi, ratamir, stirabos, talayan
Target Milestone: ovirt-4.2.3Keywords: Automation, AutomationBlocker
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-22 14:37:47 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:
Attachments:
Description Flags
ovirt hosted engine setup log
none
answer file
none
answer file with environment default section first none

Description Kobi Hakimi 2018-04-17 08:32:22 UTC
Created attachment 1422945 [details]
ovirt hosted engine setup log

Description of problem:
Ansible deploy of HE failed with error "Please specify host FQDN" when using an answer file

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.2.17-1.el7ev.noarch
rhvm-appliance-4.2-20180410.0.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Strat run ansible deploy by running the command:
hosted-engine --deploy --config-append=/etc/ansible-ovirt/answers

Actual results:
get multiple times the following error:
[ 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:  []: 


Expected results:
To be able to run with an answer file and take the fqdn from there

Additional info:
you can see the attached ovirt-hosted engine log file.
This it looks like this issue related to the changes in bug#:
https://bugzilla.redhat.com/show_bug.cgi?id=1560551

Comment 1 Ido Rosenzwig 2018-04-17 08:56:27 UTC
Please attach also the answerfile

Comment 2 Kobi Hakimi 2018-04-17 09:03:48 UTC
Created attachment 1422955 [details]
answer file

Comment 3 Ido Rosenzwig 2018-04-17 09:25:42 UTC
Try to change the header of the answerfile to: [environment:default]
Does it help?

Comment 4 Kobi Hakimi 2018-04-17 14:57:11 UTC
I started to deploy but it succeeds... 
so I investigate it and found out that because it's installed on rhvh-4.2.2.1-0.20180404.0 we have there ovirt-hosted-engine-setup-2.2.15-1.el7ev.noarch

I'll try on different env and update.

Comment 5 Kobi Hakimi 2018-04-17 16:31:04 UTC
(In reply to Ido Rosenzwig from comment #3)
> Try to change the header of the answerfile to: [environment:default]
> Does it help?

It didn't help 
attached the new answer file with [environment:default] section first

Comment 6 Kobi Hakimi 2018-04-17 16:31:53 UTC
Created attachment 1423141 [details]
answer file with environment default section first

Comment 7 Simone Tiraboschi 2018-04-18 08:26:59 UTC
(In reply to Kobi Hakimi from comment #6)
> Created attachment 1423141 [details]
> answer file with environment default section first

 [environment:init]
 DIALOG/autoAcceptDefault=bool:True
 [environment:default]

was correct, please keep it

Comment 8 Simone Tiraboschi 2018-04-18 09:31:06 UTC
In upstream CI test answer file template we are using:

 OVEHOSTED_NETWORK/fqdn=str:@HOSTEDENGINE@.@DOMAIN@
 OVEHOSTED_VM/cloudinitInstanceDomainName=str:@DOMAIN@
 OVEHOSTED_VM/cloudinitInstanceHostName=str:@HOSTEDENGINE@.@DOMAIN@

Can you please try explicitly setting all the three values?

Comment 9 Kobi Hakimi 2018-04-22 14:35:00 UTC
(In reply to Simone Tiraboschi from comment #8)
> In upstream CI test answer file template we are using:
> 
>  OVEHOSTED_NETWORK/fqdn=str:@HOSTEDENGINE@.@DOMAIN@
>  OVEHOSTED_VM/cloudinitInstanceDomainName=str:@DOMAIN@
>  OVEHOSTED_VM/cloudinitInstanceHostName=str:@HOSTEDENGINE@.@DOMAIN@
> 
> Can you please try explicitly setting all the three values?

Thanks Simone!!!
these three values resolved this issue.

Comment 10 Ido Rosenzwig 2018-04-22 14:37:47 UTC
closing since the problem has been solved.