[ovs-dev] [idl 1/4] ovs-monitor-ipsec: Use same pattern as ovs-xapi-sync.

Ben Pfaff blp at nicira.com
Wed Mar 28 00:00:53 UTC 2012


This does not fix an actual bug in ovs-monitor-ipsec because it does not
ever commit any changes to the database.

Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 debian/ovs-monitor-ipsec |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/ovs-monitor-ipsec b/debian/ovs-monitor-ipsec
index a4a4575..5024277 100755
--- a/debian/ovs-monitor-ipsec
+++ b/debian/ovs-monitor-ipsec
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-# Copyright (c) 2009, 2010, 2011 Nicira Networks
+# Copyright (c) 2009, 2010, 2011, 2012 Nicira Networks
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -421,17 +421,20 @@ def main():
     ipsec = IPsec()
 
     interfaces = {}
+    seqno = idl.change_seqno    # Sequence number when we last processed the db
     while True:
         unixctl_server.run()
         if exiting:
             break
 
-        if not idl.run():
+        idl.run()
+        if seqno == idl.change_seqno:
             poller = ovs.poller.Poller()
             unixctl_server.wait(poller)
             idl.wait(poller)
             poller.block()
             continue
+        seqno = idl.change_seqno
 
         ssl_cert = get_ssl_cert(idl.tables)
 
-- 
1.7.2.5




More information about the dev mailing list