From patchwork Tue Nov 5 09:22:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1189445 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476khw05n5z9s4Y for ; Tue, 5 Nov 2019 20:22:39 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id A63BD1965; Tue, 5 Nov 2019 09:22:36 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 4BC13194F for ; Tue, 5 Nov 2019 09:22:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 797EF27B for ; Tue, 5 Nov 2019 09:22:34 +0000 (UTC) Received: from nummac.local (unknown [27.7.151.135]) (Authenticated sender: numans@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 312BD200008; Tue, 5 Nov 2019 09:22:31 +0000 (UTC) From: numans@ovn.org To: dev@openvswitch.org Date: Tue, 5 Nov 2019 14:52:15 +0530 Message-Id: <20191105092215.3656232-1-numans@ovn.org> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH ovn v2 0/3] Health check feature for Load balancer backends X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Numan Siddique This series adds load balancer health check feature. With this ovn-controllers will periodically check the status of the backend services. Only those services which are online/active will be considered for load balancing. Right now this feature is restricted to IPv4 Load balancers only. CMS needs to enable this feature and the load balancer vips and backends should have L4 port defined. For TCP backends, the local ovn-controller which binds that service's VIF, will periodically send a SYN packet and would expect SYN-ACK response to set the status of that service to online. If no response is received within the timeout, then the service status is set to offline. For UDP backends, the local ovn-controller which binds that service's VIF, will periodically send an UDP packet and expects no reply. If no reply is received within the timeout vallue, the service status is set to online. In case the service is down, then ovn-controller expects ICMP unreachable packet and upon receiving this ICMP packets, it sets the status to offline. ovn-northd adds only those backends whose status is 'online' or empty to the ct_lb action. v1 -> v2 ------- * Addressed review comment from Mark in p1. * Rebased to latest master and resolved conflicts. Numan Siddique (3): ovn-northd: Add support for Load Balancer health check Add a new action - handle_svc_check Send service monitor health checks controller/ovn-controller.c | 2 + controller/pinctrl.c | 775 ++++++++++++++++++++++++++++++++-- controller/pinctrl.h | 2 + include/ovn/actions.h | 17 +- lib/actions.c | 42 ++ northd/ovn-northd.8.xml | 85 +++- northd/ovn-northd.c | 510 ++++++++++++++++++++-- ovn-nb.ovsschema | 25 +- ovn-nb.xml | 68 +++ ovn-sb.ovsschema | 33 +- ovn-sb.xml | 102 +++++ tests/ovn-northd.at | 215 ++++++++++ tests/ovn.at | 132 ++++++ tests/system-common-macros.at | 1 + tests/system-ovn.at | 180 ++++++++ utilities/ovn-trace.c | 3 + 16 files changed, 2119 insertions(+), 73 deletions(-)