Bug 1014112

Summary: Missing parameter to log message which is printed when a vm needs to be migrated to a better host causes the migration failure.
Product: Red Hat Enterprise Virtualization Manager Reporter: Leonid Natapov <lnatapov>
Component: ovirt-hosted-engine-haAssignee: Greg Padgett <gpadgett>
Status: CLOSED ERRATA QA Contact: Artyom <alukiano>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, amureini, dfediuck, gpadgett, iheim, mavital, sbonazzo, scohen, yeylon
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: ovirt-hosted-engine-ha-0.1.0-0.3.1.beta1.el6ev Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 16:50:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Leonid Natapov 2013-10-01 12:38:15 UTC
Missing parameter to log message which is printed when a vm needs to be migrated to a better host caused failure in second host's ON state, causing a) metadata to not be updated, b) vm to not be migrated, c) first host to think second host died, d) first host to try and start vm.

agent.log output:
-----
': 'purple-vds3.qa.lab.tlv.redhat.com', 'alive': True, 'engine-status': 'vm-up good-health-status', 'score': 1000, 'first-update': False}
MainThread::DEBUG::2013-10-01 15:36:41,120::hosted_engine::664::HostedEngine::(_perform_engine_actions) Processing engine state ON
MainThread::WARNING::2013-10-01 15:36:41,120::hosted_engine::238::HostedEngine::(start_monitoring) Error while monitoring engine: not enough arguments for format string
MainThread::WARNING::2013-10-01 15:36:41,120::hosted_engine::241::HostedEngine::(start_monitoring) Unexpected error
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/agent/hosted_engine.py", line 235, in start_monitoring
    self._perform_engine_actions()
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/agent/hosted_engine.py", line 666, in _perform_engine_actions
    = self._vm_state_actions[self._rinfo['current-state']]()
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/agent/hosted_engine.py", line 44, in cleanup_wrapper
    ret = f(self)
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/agent/hosted_engine.py", line 794, in _handle_on
    self._all_host_stats[best_host_id]['hostname'])
  File "/usr/lib64/python2.6/logging/__init__.py", line 1082, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib64/python2.6/logging/__init__.py", line 1173, in _log
    self.handle(record)
  File "/usr/lib64/python2.6/logging/__init__.py", line 1183, in handle
    self.callHandlers(record)
  File "/usr/lib64/python2.6/logging/__init__.py", line 1220, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python2.6/logging/__init__.py", line 679, in handle
    self.emit(record)
  File "/usr/lib64/python2.6/logging/handlers.py", line 786, in emit
    msg = self.format(record)
  File "/usr/lib64/python2.6/logging/__init__.py", line 654, in format
    return fmt.format(record)
  File "/usr/lib64/python2.6/logging/__init__.py", line 436, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.6/logging/__init__.py", line 306, in getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string

Comment 1 Sandro Bonazzola 2013-10-02 07:26:41 UTC
Patch merged upstream master

Comment 2 Leonid Natapov 2013-10-02 11:33:59 UTC
Instructions for QA:
Check that engine vm migration works e.g. when engine vm dies on on host it starts on t he second. Check that there is no "TypeError: not enough arguments for format string" error in agent.log file.

Comment 3 Greg Padgett 2013-10-03 22:14:40 UTC
Change-Id: Icb5bd3bd46b63ecbeeb8e1d0fdc8ca9b2c9e0f23

Comment 5 Leonid Natapov 2013-10-21 11:03:05 UTC
fixed.

Comment 6 Charlie 2013-11-28 01:42:20 UTC
This bug is currently attached to errata RHEA-2013:15591. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to 
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

Comment 7 Greg Padgett 2013-12-06 18:01:11 UTC
ovirt-hosted-engine-ha is a new package; does not need errata for bugs during its development.

Comment 8 errata-xmlrpc 2014-01-21 16:50:24 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/RHEA-2014-0080.html