Bug 1018829

Summary: broker started ~200ms after agent causing the transient error.
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: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: amureini, dfediuck, gpadgett, iheim, mavital, sbonazzo, scohen
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sla
Fixed In Version: ovirt-hosted-engine-ha-0.1.0-0.5.1.beta1.el6ev Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 16:50:54 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:

Description Leonid Natapov 2013-10-14 13:28:17 UTC
Description of problem:

When ha agent starts for the very first time broker started ~200ms after agent causing the transient error. Happened for me only on the first start of ha-agent.
----

VMainThread::INFO::2013-10-14 15:52:38,198::agent::50::Broker::(run) ovirt-hosted-engine-ha agent 0.1.0-0.2.beta1 started
MainThread::DEBUG::2013-10-14 15:52:38,199::agent::55::Broker::(run) Verifying execution as root
MainThread::DEBUG::2013-10-14 15:52:38,199::agent::62::Broker::(run) Writing pid file
MainThread::DEBUG::2013-10-14 15:52:38,201::agent::73::Broker::(run) Running as vdsm:kvm (36:36)
MainThread::DEBUG::2013-10-14 15:52:38,201::agent::85::Broker::(run) Running agent as daemon
MainThread::DEBUG::2013-10-14 15:52:38,201::agent::91::Broker::(run) Preserving [<open file '/var/log/ovirt-hosted-engine-ha/agent.log', mode 'a' at 0x7f1d06dcce40>, <socket._socketobject object at 0x7f1d10db4c90>]
MainThread::INFO::2013-10-14 15:52:38,223::hosted_engine::277::HostedEngine::(_initialize_broker) Initializing ha-broker connection
MainThread::INFO::2013-10-14 15:52:38,223::brokerlink::39::BrokerLink::(connect) Connecting to ha-broker
MainThread::ERROR::2013-10-14 15:52:38,225::brokerlink::44::BrokerLink::(connect) Failed to connect to broker: [Errno 111] Connection refused
MainThread::ERROR::2013-10-14 15:52:38,225::hosted_engine::283::HostedEngine::(_initialize_broker) Failed to connect to ha-broker: [Errno 111] Connection refused
MainThread::WARNING::2013-10-14 15:52:38,225::hosted_engine::247::HostedEngine::(start_monitoring) Error while monitoring engine: [Errno 111] Connection refused
MainThread::WARNING::2013-10-14 15:52:38,225::hosted_engine::250::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 234, in start_monitoring
    self._initialize_broker()
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/agent/hosted_engine.py", line 281, in _initialize_broker
    self._broker.connect()
  File "/usr/lib/python2.6/site-packages/ovirt_hosted_engine_ha/lib/brokerlink.py", line 42, in connect
    self._socket.connect(constants.BROKER_SOCKET_FILE)
  File "<string>", line 1, in connect
error: [Errno 111] Connection refused

Comment 1 Sandro Bonazzola 2013-11-05 11:05:46 UTC
patch merged upstream master.

Comment 3 Artyom 2013-11-08 05:46:45 UTC
Verified on ovirt-hosted-engine-ha-0.1.0-0.5.1.beta1.el6ev.noarch
No error in agent.log on time of starting ha agent first time

Comment 4 Charlie 2013-11-28 01:41:55 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 5 Greg Padgett 2013-12-06 17:59:55 UTC
ovirt-hosted-engine-ha is a new package; does not need errata for bugs during its development.

Comment 6 errata-xmlrpc 2014-01-21 16:50:54 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