Bug 1221176

Summary: hosted-engine accepts FQDNs with underscore while the engine correctly fails on that
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Simone Tiraboschi <stirabos>
Component: GeneralAssignee: Rafael Martins <rmartins>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.2.4CC: bmcclain, bugs, gklein, lsurette, pstehlik, rbalakri, sbonazzo, srevivo, ykaul, ylavi
Target Milestone: ovirt-4.0.0-alphaKeywords: EasyFix, Triaged
Target Release: 2.0.0Flags: rule-engine: ovirt-4.0.0+
bmcclain: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
"hosted-engine --deploy" used to accept FQDNs with underscores, that are invalid and were already refused by "engine-setup". "hosted-engine --deploy" now refuses FQDNs with undescores as well.
Story Points: ---
Clone Of:
: 1269182 (view as bug list) Environment:
Last Closed: 2016-07-05 07:51:00 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: 1269182    

Description Simone Tiraboschi 2015-05-13 12:34:23 UTC
Description of problem:
ovirt-hosted-engine-setup doesn't complain trying to deploy on an host with '_' in its name while the engine than correctly refuse to add the host not validating its name.

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup.noarch       1.2.4-0.0.master.20150513073740.git86111d0.el7

How reproducible:


Steps to Reproduce:
1. set an hostname with '_' in the name
2. launch hosted-engine --deploy
3.

Actual results:
It accepts the wrong hostname

Expected results:
It should complain about the hostname being invalid due to RFC952


Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2015-10-27 13:59:31 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Nikolai Sednev 2016-04-10 14:09:41 UTC
Works for me on these components:

qemu-kvm-rhev-2.3.0-31.el7_2.11.x86_64
libvirt-client-1.2.17-13.el7_2.4.x86_64
vdsm-4.17.999-817.git03d82f6.el7.centos.noarch
mom-0.5.2-0.0.master.20160226114234.git95535d1.el7.noarch
sanlock-3.2.4-2.el7_2.x86_64
ovirt-hosted-engine-ha-2.0.0-0.0.master.20160321143043.20160321143039.gitadbef4c.el7.noarch
ovirt-setup-lib-1.0.2-0.0.master.20160119215211.gita8bd5cb.el7.centos.noarch
ovirt-vmconsole-1.0.1-0.0.master.20160309100203.gitdfa3c40.el7.noarch
ovirt-release40-4.0.0-0.2.alpha1.20160405123556.gitbd184ec.noarch
libgovirt-0.3.3-1.el7_2.1.x86_64
ovirt-vmconsole-host-1.0.1-0.0.master.20160309100203.gitdfa3c40.el7.noarch
ovirt-engine-sdk-python-3.6.3.1-0.1.20160211.git13845c8.el7.centos.noarch
ovirt-hosted-engine-setup-2.0.0-0.0.master.20160318071154.gite339fa9.el7.centos.noarch
ovirt-host-deploy-1.5.0-0.0.master.20160317100615.gitf913ead.el7.noarch

Red Hat Enterprise Linux Server release 7.2 (Maipo)
Linux 3.10.0-327.13.1.el7.x86_64 #1 SMP Mon Feb 29 13:22:02 EST 2016 x86_64 x86_64 x86_64 GNU/Linux


I'm getting the error as follows:
          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):  []: nsed_nev-he-2.qa.lab.tlv.redhat.com       
[ ERROR ] Host name is not valid: Host name nsed_nev-he-2.some.bla.bla.company.com is not valid
          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):  []:

Comment 3 Sandro Bonazzola 2016-07-05 07:51:00 UTC
oVirt 4.0.0 has been released, closing current release.