Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1150073 - Running hosted-engine --vm-status, when ovirt-ha-broker service stopped, drop exception
Running hosted-engine --vm-status, when ovirt-ha-broker service stopped, drop...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-ha (Show other bugs)
3.5.0
x86_64 Linux
unspecified Severity high
: ovirt-3.6.0-rc
: 3.6.0
Assigned To: Doron Fediuck
Artyom
: Triaged, ZStream
Depends On: 1208458 1213878 1227466
Blocks: 1219051
  Show dependency treegraph
 
Reported: 2014-10-07 07:54 EDT by Artyom
Modified: 2016-04-05 07:29 EDT (History)
10 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 1219051 (view as bug list)
Environment:
Last Closed: 2016-03-09 14:48:34 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1436323 None None None Never
oVirt gerrit 33933 master MERGED don't print stack trace when the ha broker is unreachable Never
oVirt gerrit 40734 ovirt-hosted-engine-setup-1.2 MERGED don't print stack trace when the ha broker is unreachable Never
Red Hat Product Errata RHEA-2016:0422 normal SHIPPED_LIVE ovirt-hosted-engine-ha bug fix and enhancement update 2016-03-09 18:58:25 EST

  None (edit)
Description Artyom 2014-10-07 07:54:41 EDT
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 03:41:37 EDT
Like Artyom says, it should rather print some error message than the full exception.
Comment 3 Eyal Edri 2015-02-25 03:45:30 EST
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 10:19:29 EDT
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 14:48:34 EST
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.