From patchwork Wed May 8 11:53:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jaime_Caama=C3=B1o_Ruiz?= X-Patchwork-Id: 1097008 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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.com 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 44zZf41Gchz9s4V for ; Wed, 8 May 2019 21:54:51 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 5697728D2; Wed, 8 May 2019 11:54:16 +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 BBA8A28C9 for ; Wed, 8 May 2019 11:54:14 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 3F9358F9 for ; Wed, 8 May 2019 11:54:14 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B4FB0ADF2 for ; Wed, 8 May 2019 11:54:12 +0000 (UTC) From: =?utf-8?q?Jaime_Caama=C3=B1o_Ruiz?= To: dev@openvswitch.org Date: Wed, 8 May 2019 13:53:46 +0200 Message-Id: <20190508115348.7937-2-jcaamano@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190508115348.7937-1-jcaamano@suse.com> References: <20190508115348.7937-1-jcaamano@suse.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: =?utf-8?q?Jaime_Caama=C3=B1o_Ruiz?= Subject: [ovs-dev] [PATCH 2/4] rhel: start ovn-controller-vtep with ovn-ctl 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 Use ovn-ctl to start ovn-controller-vtep from the corresponding systemd unit file. Signed-off-by: Jaime CaamaƱo Ruiz --- ovn/utilities/ovn-ctl | 10 +++++++++- rhel/usr_lib_systemd_system_ovn-controller-vtep.service | 12 ++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl index cca5facdc..a43533b69 100755 --- a/ovn/utilities/ovn-ctl +++ b/ovn/utilities/ovn-ctl @@ -346,7 +346,7 @@ start_controller () { } start_controller_vtep () { - set ovn-controller-vtep "unix:$DB_SOCK" + set ovn-controller-vtep set "$@" -vconsole:emer -vsyslog:err -vfile:info if test X"$OVN_CONTROLLER_SSL_KEY" != X; then set "$@" --private-key=$OVN_CONTROLLER_SSL_KEY @@ -360,6 +360,12 @@ start_controller_vtep () { if test X"$OVN_CONTROLLER_SSL_BOOTSTRAP_CA_CERT" != X; then set "$@" --bootstrap-ca-cert=$OVN_CONTROLLER_SSL_BOOTSTRAP_CA_CERT fi + if test X"$DB_SOCK" != X; then + set "$@" --vtep-db=$DB_SOCK + fi + if test X"$DB_SB_SOCK" != X; then + set "$@" --ovnsb-db=$DB_SB_SOCK + fi [ "$OVN_USER" != "" ] && set "$@" --user "$OVN_USER" @@ -598,6 +604,8 @@ Options: File location options: --db-sock=SOCKET JSON-RPC socket name (default: $DB_SOCK) + --db-nb-sock=SOCKET OVN_Northbound db socket (default: $DB_NB_SOCK) + --db-sb-scok=SOCKET OVN_Southbound db socket (default: $DB_SB_SOCK) --db-nb-file=FILE OVN_Northbound db file (default: $DB_NB_FILE) --db-sb-file=FILE OVN_Southbound db file (default: $DB_SB_FILE) --db-nb-schema=FILE OVN_Northbound db file (default: $DB_NB_SCHEMA) diff --git a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service b/rhel/usr_lib_systemd_system_ovn-controller-vtep.service index d6bfef1d4..5f69c57bb 100644 --- a/rhel/usr_lib_systemd_system_ovn-controller-vtep.service +++ b/rhel/usr_lib_systemd_system_ovn-controller-vtep.service @@ -33,16 +33,16 @@ Requires=openvswitch.service After=openvswitch.service [Service] -Type=simple +Type=forking +PIDFile=/var/run/openvswitch/ovn-controller-vtep.pid Restart=on-failure -Environment=OVS_RUNDIR=%t/openvswitch Environment=OVN_DB=unix:%t/openvswitch/ovnsb_db.sock Environment=VTEP_DB=unix:%t/openvswitch/db.sock EnvironmentFile=-/etc/sysconfig/ovn-controller-vtep -ExecStart=/usr/bin/ovn-controller-vtep -vconsole:emer -vsyslog:err -vfile:info \ - --log-file=/var/log/openvswitch/ovn-controller-vtep.log \ - --no-chdir --pidfile=${OVS_RUNDIR}/ovn-controller-vtep.pid \ - --ovnsb-db=${OVN_DB} --vtep-db=${VTEP_DB} +ExecStart=/usr/share/openvswitch/scripts/ovn-ctl \ + --db-sb-sock=${OVN_DB} --db-sock=${VTEP_DB} \ + start_controller_vtep +ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_controller_vtep [Install] WantedBy=multi-user.target