Bug 1059950

Summary: If cluster=Default does not exist in hosted-engine it will fail and timeout
Product: [Retired] oVirt Reporter: Andrew Lau <andrew>
Component: ovirt-hosted-engine-setupAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4CC: iheim, nlevinki, rbalakri, rmcswain, s.kieske, yeylon
Target Milestone: ---Keywords: Patch
Target Release: 3.5.0Flags: sbonazzo: ovirt_requires_release_note?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: ovirt-3.5.0-alpha1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:40:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1043906    

Description Andrew Lau 2014-01-31 03:41:14 UTC
Description of problem:
If the cluster "Default" is deleted or renamed (in my case) the adding of new hosts with the hosted-engine --deploy command will fail in an ideal way.

The output will start like below and continue to spam the last message for 30 minutes until it times out.

[ INFO  ] Engine replied: DB Up!Welcome to Health Status!
[ ERROR ] Cannot automatically add the host to the Default cluster: Entity not found: Cluster: name=Default 
[ 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...
<snip>
[ ERROR ] Timed out while waiting for host to start. Please check the logs.
[ ERROR ] Unable to add HV02 to the manager
[ INFO  ] Enabling and starting HA services
          Hosted Engine successfully set up
[ INFO  ] Stage: Clean up
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination

The host will be added to the HA services, however the engine will not have the host. Adding a new cluster called "Default", the host was added successfully.

I think the hosted-engine should either create a new cluster=Default or simply add it to the first cluster? Alternatively allow the user to input which cluster the host should be added to as to avoid this issue.

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-1.2.0-0.0.master.20140117.gitfaf77a5.el6.noarch
ovirt-hosted-engine-ha-1.1.0-0.0.master.20140118.git3db8f76.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install hosted-engine, rename cluster!=Default
2. Deploy a second host to be added to hosted-engine

Actual results:
setup will hang for 30+ minutes until timeout and the host will be added to the ha-services but not the engine.

Expected results:
host will be added to ha-services and engine.

Additional info:
The other case may be related to Default cluster doesn't have "gluster service" enabled as moving the host to the gluster enabled cluster seems to fail (I think because they are not peers yet).

Comment 1 Sandro Bonazzola 2014-03-06 10:51:25 UTC
Patch submitted to master branch by Meital Bourvine, currently under review.

Comment 2 Sandro Bonazzola 2014-04-02 09:59:48 UTC
Re-targeting to 3.5 since it changes the logic, the UX, and the setup flow.

Comment 3 Sandro Bonazzola 2014-04-08 13:46:56 UTC
*** Bug 1085113 has been marked as a duplicate of this bug. ***

Comment 4 Sandro Bonazzola 2014-10-17 12:40:21 UTC
oVirt 3.5 has been released and should include the fix for this issue.