Bug 1041203

Summary: hosted-engine getting traceback if ha cluster has never been in maintenance mode
Product: Red Hat Enterprise Virtualization Manager Reporter: movciari
Component: ovirt-hosted-engine-setupAssignee: Greg Padgett <gpadgett>
Status: CLOSED ERRATA QA Contact: movciari
Severity: high Docs Contact:
Priority: medium    
Version: 3.3.0CC: acathrow, amureini, gpadgett, iheim, oschreib, pstehlik, sbonazzo
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 16:57:36 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:

Description movciari 2013-12-12 13:57:26 UTC
Description of problem:
getting this traceback until you enable maintenance for the first time:
hosted-engine --vm-status
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 78, in print_status
    if cluster_stats.get(client.HAClient.GlobalMdFlags.MAINTENANCE, False):
UnboundLocalError: local variable 'cluster_stats' referenced before assignment

Version-Release number of selected component (if applicable):
is27

How reproducible:
always

Steps to Reproduce:
1. install new hosted-engine setup
2. hosted-engine --vm-status


Actual results:
you will get traceback

Expected results:
you should get info about status of hosted engine

Additional info:

Comment 1 Sandro Bonazzola 2013-12-12 14:30:02 UTC
patch merged upstream master, under review on upstream 1.0 branch

Comment 2 Sandro Bonazzola 2013-12-13 10:12:26 UTC
patch merged on upstream 1.0 branch

Comment 4 errata-xmlrpc 2014-01-21 16:57:36 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.

http://rhn.redhat.com/errata/RHBA-2014-0083.html