From patchwork Fri Jan 12 19:19:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 860156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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 3zJCJR50W0z9sBd for ; Sat, 13 Jan 2018 06:20:39 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id CF850E9E; Fri, 12 Jan 2018 19:19:43 +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 84D19E37 for ; Fri, 12 Jan 2018 19:19:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CC52E477 for ; Fri, 12 Jan 2018 19:19:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C4D8C04AC49 for ; Fri, 12 Jan 2018 19:19:38 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DB10189F9 for ; Fri, 12 Jan 2018 19:19:37 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Fri, 12 Jan 2018 14:19:35 -0500 Message-Id: <20180112191935.1589-3-aconole@redhat.com> In-Reply-To: <20180112191935.1589-1-aconole@redhat.com> References: <20180112191935.1589-1-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 12 Jan 2018 19:19:38 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD 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] [RFC 2/2] rhel: tell ovsctl to freeze the datapath 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: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This commit uses the previous to stop it from deleting active flows in the datapath. Signed-off-by: Aaron Conole --- rhel/usr_lib_systemd_system_ovs-vswitchd.service.in | 2 +- utilities/ovs-ctl.in | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in index c6d9aa1b8..4c0703b23 100644 --- a/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in +++ b/rhel/usr_lib_systemd_system_ovs-vswitchd.service.in @@ -23,7 +23,7 @@ ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \ start $OPTIONS ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server \ - --no-monitor --system-id=random \ + --no-monitor --system-id=random --freeze-datapath \ --ovs-user=${OVS_USER_ID} \ restart $OPTIONS TimeoutSec=300 diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index f1b01d1d3..3e02613eb 100755 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -306,6 +306,9 @@ ovs_save () { } save_flows_if_required () { + if test X"$FREEZE_DATAPATH" != Xyes; then + action "Freezing datapath" ovs-appctl dpctl/datapath-icing system@ovs-system enabled + fi if test X"$DELETE_BRIDGES" != Xyes; then action "Saving flows" ovs_save save-flows "${script_flows}" fi @@ -494,6 +497,7 @@ set_defaults () { DELETE_BRIDGES=no DELETE_TRANSIENT_PORTS=no + FREEZE_DATAPATH=no DAEMON_CWD=/ FORCE_COREFILES=yes