Message ID | 1445936735-13729-1-git-send-email-rbryant@redhat.com |
---|---|
State | Accepted |
Headers | show |
On Tue, Oct 27, 2015 at 06:05:33PM +0900, Russell Bryant wrote: > This code does some checking to validate the existing encaps for a > chassis to see if they need to be updated. This typo resulted in > ovn-controller re-creating its encap(s) every time this code ran, making > ovn-controller and ovsdb-server eat up a CPU in my testing. > > Signed-off-by: Russell Bryant <rbryant@redhat.com> Thanks for finding and fixing the problem. Acked-by: Ben Pfaff <blp@nicira.com>
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;
This code does some checking to validate the existing encaps for a chassis to see if they need to be updated. This typo resulted in ovn-controller re-creating its encap(s) every time this code ran, making ovn-controller and ovsdb-server eat up a CPU in my testing. Signed-off-by: Russell Bryant <rbryant@redhat.com> --- ovn/controller/chassis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)