From: Aaron Rosen Date: Wed, 17 Jun 2015 00:23:09 +0000 (-0700) Subject: ovsdb: session.rpc never initialized X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=95b6a74af10e2150b017647028de8454ef1cda2f;p=openstack-build%2Fneutron-build.git ovsdb: session.rpc never initialized Previously, if idl.Transaction.commit_block() returned a status of TRY_AGAIN we would check self.api.idl._session.rpc.status which would result in an attribute error as rpc is None. This patch fixes this attribute error by removing this unneeded check. In addtion, the force_reconnect() is also removed as ovs.jsonrpc handles reconnecting automatically for us. Change-Id: Ibf3ce5cd3432845f8938a1d83637ecf59b14b5ca Closes-bug: 1465889 --- diff --git a/neutron/agent/ovsdb/impl_idl.py b/neutron/agent/ovsdb/impl_idl.py index 57399fc01..51ea96f17 100644 --- a/neutron/agent/ovsdb/impl_idl.py +++ b/neutron/agent/ovsdb/impl_idl.py @@ -93,9 +93,6 @@ class Transaction(api.Transaction): status = txn.commit_block() if status == txn.TRY_AGAIN: LOG.debug("OVSDB transaction returned TRY_AGAIN, retrying") - if self.api.idl._session.rpc.status != 0: - LOG.debug("Lost connection to OVSDB, reconnecting!") - self.api.idl.force_reconnect() idlutils.wait_for_change( self.api.idl, self.timeout - elapsed_time, seqno)