Bug 1154362 - [hosted-engine] cannnot add host to cluster automatically.
Summary: [hosted-engine] cannnot add host to cluster automatically.
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup
Version: 3.5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 3.5.0
Assignee: Sandro Bonazzola
QA Contact: meital avital
URL:
Whiteboard: integration
Depends On:
Blocks: oVirt_3.5.1_tracker
TreeView+ depends on / blocked
 
Reported: 2014-10-19 09:38 UTC by Ulhas Surse
Modified: 2015-02-25 07:20 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-28 13:26:34 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ulhas Surse 2014-10-19 09:38:44 UTC
Description of problem:
Hosted-engine setup is not adding host automatically with error: 
 Cannot automatically add the host to cluster None:
JBWEB000065: HTTP Status 401

Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization 3.5

How reproducible:
always

Steps to Reproduce:
1. Run hosted-engine --deploy
2. After creating rhevm vm, the host will not be added automatically.
3.

Actual results:
2014-10-19 03:12:10 DEBUG otopi.plugins.ovirt_hosted_engine_setup.engine.add_host add_host._closeup:415 Connecting to the Engine
2014-10-19 03:12:12 DEBUG otopi.plugins.ovirt_hosted_engine_setup.engine.add_host add_host._closeup:502 Cannot add the host to cluster None
Traceback (most recent call last):
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/ovirt-hosted-engine-setup/engine/add_host.py", line 426, in _closeup
    ca_file=self.cert,
  File "/usr/lib/python2.6/site-packages/ovirtsdk/api.py", line 154, in __init__
    url=''
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 118, in request
    persistent_auth=self._persistent_auth)
  File "/usr/lib/python2.6/site-packages/ovirtsdk/infrastructure/proxy.py", line 146, in __doRequest
    persistent_auth=persistent_auth
  File "/usr/lib/python2.6/site-packages/ovirtsdk/web/connection.py", line 134, in doRequest
    raise RequestError, response
RequestError:
status: 401
reason: Unauthorized
detail: JBWEB000065: HTTP Status 401
2014-10-19 03:12:12 ERROR otopi.plugins.ovirt_hosted_engine_setup.engine.add_host add_host._closeup:510 Cannot automatically add the host to cluster None:
JBWEB000065: HTTP Status 401
2014-10-19 03:12:12 DEBUG otopi.context context._executeMethod:152 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 142, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/ovirt-hosted-engine-setup/engine/add_host.py", line 517, in _closeup
    cluster=cluster_name,
RuntimeError: Cannot add the host to cluster None
2014-10-19 03:12:12 ERROR otopi.context context._executeMethod:161 Failed to execute stage 'Closing up': Cannot add the host to cluster None

Expected results:
Host should be added automatically.

Additional info:
workaround:
# service ovirt-ha-broker start
# service ovirt-ha-agent start
Manually add hypervisor to the manager.

Comment 1 Sandro Bonazzola 2014-10-21 08:40:27 UTC
Hi, looking at the error: 
status: 401
reason: Unauthorized

looks like you used different admin@internal password in hosted-engine --deploy on the host and in engine-setup in the VM.

Can you check if this is the case?
If not, please provide full logs from both the hosts and the vm.


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