From 88fab71350100ba544a0002780239042977df246 Mon Sep 17 00:00:00 2001 From: Hiroaki KAWAI Date: Wed, 2 May 2012 18:27:51 +0900 Subject: [PATCH] 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 --- quantum/plugins/openvswitch/agent/ovs_quantum_agent.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- 2.45.2