Bug 1065350

Summary: hosted-engine should prompt a question at the user when the host was already a host in the engine
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Antoni Segura Puimedon <asegurap>
Component: GeneralAssignee: Artyom <alukiano>
Status: CLOSED WONTFIX QA Contact: Artyom <alukiano>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.3.0CC: bazulay, bmcclain, bugs, dfediuck, gklein, mavital, rbalakri, sbonazzo, srevivo, stirabos, ylavi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-02 08:04:30 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:

Description Antoni Segura Puimedon 2014-02-14 12:51:45 UTC
Description of problem:
When migrating to hosted-engine, it is likely that one of the hosts that was being used in the engine will be part of the hostend engine datacenter.

Currently, the hosted-engine --deploy will be able to detect it and will show:
    [ INFO  ] Engine replied: DB Up!Welcome to Health Status!
    [ ERROR ] Cannot automatically add the host to the Default cluster: Cannot add Host. Host with the same UUID already exists. 
    [ INFO  ] Waiting for the host to become operational in the engine. This may take several minutes...
    [ INFO  ] Still waiting for VDSM host to become operational...
    [ INFO  ] Still waiting for VDSM host to become operational...

The problem is that after the error it should stop. Prompt the user to remove
the host from any other datacenter, then have options:
    1) Retry
    2) Abort

Otherwise it will just keep printing until timeout:
    [ INFO  ] Waiting for the host to become operational in the engine. This may take several minutes...
    [ INFO  ] Still waiting for VDSM host to become operational...
    [ INFO  ] Still waiting for VDSM host to become operational...


Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-1.1.0-0.5.beta2.fc19.noarch

How reproducible: 100%


Steps to Reproduce:
1. Migrate an engine database to a hosted engine VM running on a host that was
   already in a datacenter according to the engine
2. Continue with the host deploy.

Actual results:
This will happen:
[ INFO  ] Engine replied: DB Up!Welcome to Health Status!
[ ERROR ] Cannot automatically add the host to the Default cluster: Cannot add Host. Host with the same UUID already exists.
[ INFO  ] Waiting for the host to become operational in the engine. This may take several minutes...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...

[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ INFO  ] Still waiting for VDSM host to become operational...
[ ERROR ] Timed out while waiting for host to start. Please check the logs.
[ ERROR ] Unable to add hosted_engine_1 to the manager
          Please shutdown the VM allowing the system to launch it as a monitored service.
          The system will wait until the VM is down.
[ INFO  ] Enabling and starting HA services
          Hosted Engine successfully set up
[ INFO  ] Stage: Clean up
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination

Expected results:

After the first error, prompts the user to remove the host from the engine and
press option "continue" when ready.

Additional info:

Comment 1 Itamar Heim 2014-02-16 08:23:42 UTC
Setting target release to current version for consideration and review. please
do not push non-RFE bugs to an undefined target release to make sure bugs are
reviewed for relevancy, fix, closure, etc.

Comment 3 Sandro Bonazzola 2015-10-01 08:27:12 UTC
Simone, can you assist Artyom getting this bug fixed?

Comment 4 Simone Tiraboschi 2015-10-01 14:58:25 UTC
Sure, Artyom feel free to contact me.

Comment 5 Red Hat Bugzilla Rules Engine 2015-10-19 10:57:08 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 6 Yaniv Lavi 2015-10-29 12:05:04 UTC
In oVirt testing is done on single stream by default. Therefore I'm removing the 4.0 flag. If you think this bug must be tested in 4.0 as well, please re-add the flag. Please note we might not have testing resources to handle the 4.0 clone.

Comment 7 Mike McCune 2016-03-28 22:14:36 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 8 Sandro Bonazzola 2016-05-02 09:55:04 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 9 Yaniv Lavi 2016-05-23 13:16:47 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 10 Yaniv Lavi 2016-05-23 13:23:12 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 11 Yaniv Lavi 2016-06-02 08:04:30 UTC
We will only be supporting adding hosts via UI\REST from 4.0. Therefore closing this bug.