Bug 1791749

Summary: The engine allows adding a new host using IP as hostname while the host already exists and appears with FQDN
Product: [oVirt] ovirt-engine Reporter: Asaf Rachmani <arachman>
Component: GeneralAssignee: Dana <delfassy>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.0CC: bugs, mperina, rbarry
Target Milestone: ovirt-4.4.0Keywords: Triaged
Target Release: ---Flags: pm-rhel: ovirt-4.4+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:00:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
HostEngineLogs none

Description Asaf Rachmani 2020-01-16 12:28:16 UTC
Created attachment 1652736 [details]
HostEngineLogs

Description of problem:
The engine allows adding a new host using IP as hostname while the host already exists and appears with FQDN

Version-Release number of selected component (if applicable):
vdsm-4.40.0-1468.gitec7d91cc0.el8.x86_64
ovirt-node-ng-image-update-placeholder-4.4.0-0.3.master.20200112011807.git18c86da.el8.noarch
ovirt-engine-4.4.0-0.0.master.20200113144512.git306f670.el7.noarch
ovirt-hosted-engine-ha-2.4.1-0.0.master.20191226093537.20191226093533.git173f244.el8.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install hosted-engine
2. Via the GUI add a new host with a different name and use the hosted-engine IP address as hostname

Actual results:
The same host appears twice

Expected results:
An explicit error when trying to add the same host

Additional info:
There is no option to remove such host it gets stuck in "PreparingForMaintenance" status

Comment 1 Nikolai Sednev 2020-03-31 13:28:43 UTC
Forth to our discussion with Asaf, I added a new host with a different name and used the existing ha-host's IP address as Hostname/IP for the new host.
Engine refused as expected with:
"Error while executing action: Cannot add Host. Host with the same UUID already exists.
Close"

Tested on host with these components:
rhvm-appliance.x86_64 2:4.4-20200326.0.el8ev
ovirt-hosted-engine-setup-2.4.4-1.el8ev.noarch
ovirt-hosted-engine-ha-2.4.2-1.el8ev.noarch
Red Hat Enterprise Linux release 8.2 Beta (Ootpa)
Linux 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Engine:
ovirt-engine-setup-base-4.4.0-0.26.master.el8ev.noarch
ovirt-engine-4.4.0-0.26.master.el8ev.noarch
openvswitch2.11-2.11.0-48.el8fdp.x86_64
Linux 4.18.0-192.el8.x86_64 #1 SMP Tue Mar 24 14:06:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux release 8.2 Beta (Ootpa)

Comment 2 Sandro Bonazzola 2020-05-20 20:00:36 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 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.