Bug 978906 - host with no unique id can be activated
Summary: host with no unique id can be activated
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.3.0
Assignee: Alon Bar-Lev
QA Contact: Dušan Kajan
URL:
Whiteboard: infra
Depends On:
Blocks: 998539
TreeView+ depends on / blocked
 
Reported: 2013-06-27 09:53 UTC by Dušan Kajan
Modified: 2016-02-10 19:06 UTC (History)
12 users (show)

Fixed In Version: is6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 998539 (view as bug list)
Environment:
Last Closed: 2013-06-27 10:02:28 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log from host-deploy (69.74 KB, text/x-log)
2013-06-27 09:53 UTC, Dušan Kajan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 16523 0 None MERGED bll: do not allow host activation with no unique id 2021-02-01 05:06:20 UTC

Description Dušan Kajan 2013-06-27 09:53:17 UTC
Created attachment 766029 [details]
log from host-deploy

Description of problem:
Although there is host in cluster, it is possible to add the same host if we use hostname instead of IP address (and vice versa)

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


How reproducible:
100%

Steps to Reproduce:
1. Add host using its hostname
2. Add the same host using its IP adress

Actual results:
The host is added, only status install failed, but it is still possible to activate

Expected results:
The portal should not accept a host that is already in use

Additional info:
log from host-deploy added as attachment

Comment 1 Alon Bar-Lev 2013-06-27 10:02:28 UTC
Just for the record, it is almost impossible to know if host is the same host as host can have multiple interfaces and names.

*** This bug has been marked as a duplicate of bug 964967 ***

Comment 2 Itamar Heim 2013-07-05 07:18:21 UTC
isn't the uuid of the host supposed to fail adding/activating it?

Comment 3 Alon Bar-Lev 2013-07-05 18:41:59 UTC
(In reply to Itamar Heim from comment #2)
> isn't the uuid of the host supposed to fail adding/activating it?

When a host is added we cannot know what it is uuid, as uuid requires a logic within engine which is duplicate to host deploy, including creating vdsm id and so on, this was removed from engine in order to stop maintaining distributed duplicated algorithms throughout the project, and the past requirement to support complex dependency relationship matrix of components/versions. 

The duplicate uuid is discovered during host deploy reported to the engine to allow validation before performing the actual installation. The result is host is added, a message of duplicate uuid in event log and install failed status.

To provide earlier validation we added vdsm command to report uuid (bug#964967), that if found will be used during canDoAction of AddVdsCommand. This method does not resolve all cases, for example if host was added into engine, then completely re-installed, then re-deployed using different address, but the above safe guard will always discover that.

A better implementation compared to performing two ssh sessions (one at canDoAction and the other for host deploy) is to start the host deploy process at the canDoAction, while testing requirements at customization stage, then pass the object with the session to the actual action body. But it was way to complex with current engine design, as we split between AddVdsCommand and InstallVdsCommand, I guess because of the lack of proper development environment which required developers to hack the deploy in order to have a working system.

Comment 4 Alon Bar-Lev 2013-07-05 19:43:46 UTC
OK, it took me a while to understand the problem description.

The problem is not that the host cannot be added, this was expected, the problem is that there is no validation during activation that the host has valid uuid.

My bad.

Thanks for the report!

Comment 5 Alon Bar-Lev 2013-07-05 21:06:55 UTC
commit fcc15aa081631d08162482cf00ff2f3fa0305a9e
Author: Alon Bar-Lev <alonbl>
Date:   Fri Jul 5 23:59:49 2013 +0300

    bll: do not allow host activation with no unique id
    
    partial installation of host for various of reasons will leave a host
    with no uuid.
    
    these hosts should not be allowed to be activated.
    
    for developers, if the InstallVds option is false, this validation will
    be disabled.
    
    Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=978906
    Change-Id: I9a15416ae21c2371ebfb12cecb1551b73c98d88f
    Signed-off-by: Alon Bar-Lev <alonbl>

Comment 7 Alon Bar-Lev 2013-07-06 10:06:52 UTC
Just for the record, the correct solution would have been to avoid activation if the host is in install failed. However, there were too many cases in the past in which install failed for some reasons which was false positive.

If we are ready for prime time, we should apply this solution.

Comment 8 Dušan Kajan 2013-07-18 11:47:49 UTC
verified on is6

Comment 11 Itamar Heim 2014-01-21 22:23:18 UTC
Closing - RHEV 3.3 Released

Comment 12 Itamar Heim 2014-01-21 22:24:27 UTC
Closing - RHEV 3.3 Released

Comment 13 Itamar Heim 2014-01-21 22:28:03 UTC
Closing - RHEV 3.3 Released


Note You need to log in before you can comment on or make changes to this bug.