[ovs-dev,06/10] ovn-controller: Fix startup issue with identical chassis.
diff mbox

Message ID 1445412271-22019-6-git-send-email-jpettit@nicira.com
State Deferred
Headers show

Commit Message

Justin Pettit Oct. 21, 2015, 7:24 a.m. UTC
If ovn-controller started with an existing chassis entry that matched
its configuration, it would use 100% CPU contacting the database.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
---
 ovn/controller/chassis.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch
diff mbox

diff --git a/ovn/controller/chassis.c b/ovn/controller/chassis.c
index 6617bf3..f0dfaa5 100644
--- a/ovn/controller/chassis.c
+++ b/ovn/controller/chassis.c
@@ -95,7 +95,7 @@  chassis_run(struct controller_ctx *ctx, const char *chassis_id)
         bool same = true;
         for (int i = 0; i < chassis_rec->n_encaps; i++) {
             cur_tunnels |= get_tunnel_type(chassis_rec->encaps[i]->type);
-            same = same && strcmp(chassis_rec->encaps[i]->ip, encap_ip);
+            same = same && !strcmp(chassis_rec->encaps[i]->ip, encap_ip);
         }
         same = same && req_tunnels == cur_tunnels;