From: Hiroaki KAWAI Date: Wed, 2 May 2012 09:27:51 +0000 (+0900) Subject: Let OVSQuantumTunnelAgent sync with database X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=88fab71350100ba544a0002780239042977df246;p=openstack-build%2Fneutron-build.git Let OVSQuantumTunnelAgent sync with database In daemon_loop, db.commit() is required to fetch updated network status. Without this, ports are stick to DEAD_VLAN_TAG. Change-Id: I1a951d60eb75384676309e8db29ea7baa48055bc --- diff --git a/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py b/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py index a01289d73..f1a41fced 100755 --- a/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py +++ b/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py @@ -640,6 +640,14 @@ class OVSQuantumTunnelAgent(object): old_vif_ports = new_vif_ports old_local_bindings = new_local_bindings + try: + db.commit() + except Exception as e: + LOG.info("Unable to commit to database! Exception: %s" % e) + db.rollback() + old_local_bindings = {} + old_vif_ports = {} + time.sleep(self.polling_interval)