Bug 1150073 - Running hosted-engine --vm-status, when ovirt-ha-broker service stopped, drop exception
Summary: Running hosted-engine --vm-status, when ovirt-ha-broker service stopped, drop...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-ha
Version: 3.5.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Doron Fediuck
QA Contact: Artyom
URL:
Whiteboard:
Depends On: 1208458 1213878 1227466
Blocks: 1219051
TreeView+ depends on / blocked
 
Reported: 2014-10-07 11:54 UTC by Artyom
Modified: 2019-09-12 08:01 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
When a self-hosted engine is unable to connect to the high availability daemon it now prints an error message instead of a stack trace.
Clone Of:
: 1219051 (view as bug list)
Environment:
Last Closed: 2016-03-09 19:48:34 UTC
oVirt Team: SLA
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1436323 0 None None None Never
Red Hat Product Errata RHEA-2016:0422 0 normal SHIPPED_LIVE ovirt-hosted-engine-ha bug fix and enhancement update 2016-03-09 23:58:25 UTC
oVirt gerrit 33933 0 master MERGED don't print stack trace when the ha broker is unreachable 2020-11-23 17:54:32 UTC
oVirt gerrit 40734 0 ovirt-hosted-engine-setup-1.2 MERGED don't print stack trace when the ha broker is unreachable 2020-11-23 17:54:30 UTC

Description Artyom 2014-10-07 11:54:41 UTC
Description of problem:
Running hosted-engine --vm-status, when ovirt-ha-broker service stopped, drop exception

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-ha-1.2.2-2.el6ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install hosted-engine environment with one host
2. Stop service ovirt-ha-broker
3. Run hosted-engine --vm-status

Actual results:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_setup/vm_status.py", line 111, in <module>
    if not status_checker.print_status():
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_setup/vm_status.py", line 58, in print_status
    all_host_stats = ha_cli.get_all_host_stats()
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/client/client.py", line 155, in get_all_host_stats
    return self.get_all_stats(self.StatModes.HOST)
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/client/client.py", line 97, in get_all_stats
    with broker.connection():
  File "/usr/lib64/python2.6/contextlib.py", line 16, in __enter__
    return self.gen.next()
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py", line 99, in connection
    self.connect()
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py", line 78, in connect
    raise BrokerConnectionError(error_msg)
ovirt_hosted_engine_ha.lib.exceptions.BrokerConnectionError: Failed to connect to broker, the number of errors has exceeded the limit (5)


Expected results:
Some error message about that service down and impossible to run hosted-engine commands.

Additional info:

Comment 1 Jiri Moskovcak 2014-10-08 07:41:37 UTC
Like Artyom says, it should rather print some error message than the full exception.

Comment 3 Eyal Edri 2015-02-25 08:45:30 UTC
3.5.1 is already full with bugs (over 80), and since none of these bugs were added as urgent for 3.5.1 release in the tracker bug, moving to 3.5.2

Comment 4 Artyom 2015-04-26 14:19:29 UTC
Verified on: 
ovirt-hosted-engine-ha-1.3.0-0.0.master.20150316142823.20150316142819.git0c1bea5.el7.noarch

Run hosted-engine --vm-status, when ovirt-ha-broker stopped return:
Failed to connect to broker, the number of errors has exceeded the limit (5)
Cannot connect to the HA daemon, please check the logs.

Comment 9 errata-xmlrpc 2016-03-09 19:48:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-0422.html


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