From patchwork Wed Aug 28 16:38:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Numan Siddique X-Patchwork-Id: 1154620 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=fail (p=none dis=none) header.from=redhat.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 46JWgm5tC9z9s7T for ; Thu, 29 Aug 2019 02:40:20 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id BDDCD322A; Wed, 28 Aug 2019 16:39:24 +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 1FE662FBA for ; Wed, 28 Aug 2019 16:39:11 +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 9357042D for ; Wed, 28 Aug 2019 16:39:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 26D2E308FB82 for ; Wed, 28 Aug 2019 16:39:08 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-190.sin2.redhat.com [10.67.116.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2EB3410018F9; Wed, 28 Aug 2019 16:39:05 +0000 (UTC) From: nusiddiq@redhat.com To: dev@openvswitch.org Date: Wed, 28 Aug 2019 22:08:48 +0530 Message-Id: <20190828163848.7432-1-nusiddiq@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 28 Aug 2019 16:39:08 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 v4 ovn 0/4] External OVS source support and separate run dir for OVN 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 patch series adds support for building OVN from external OVS sources. The first patch adds the support to compile OVN from external OVS sources. The following configuration options are added when configuring OVN * --with-ovs-source (mandatory) * --with-ovs-build (optional) Patch 2 adds support to run OVN services using separate directores - Default run time dir - /usr/local/var/run/ovm - Default log dir - /usr/loca/var/log/ovn - Default db dir - /usr/loca/etc/ovn Patch 3 fixes "make rpm-fedora" which is presently broken Patch 4 runs OVN services as openvswitch user for rhel when rpms are used. v3 -> v4 ======= * Rebased to latest master to resolve merge conflict in p2 v2 -> v3 ======= * Added the support to provide the ovs source and build dirs as relative paths as suggested By Ben in the irc meeting. * Dropped patch 5 from the series which was added in v2. Patch 5 deleted the python subdirectory in the ovn repo. But that patch is failing in travis CI. It will be submitted separately once I get the chance to work on it and the fix the issue. v1 -> v2 ======== * Addressed the review comments. * Swapped the patch 1 and 2 as it was easier to address Mark's comment on OVS_RUNDIR/OVN_RUNDIR * In patch 2, renamed m4/openvswitch.m4 to m4/ovn.m4 and renamed few of the macros to OVS_* to OVN_*. * Combined the patch 1 and 2 in this series which were submitted separately earlier. Numan Siddique (4): Build OVN using external OVS directory Add support for using OVN specific rundirs Fix "make rpm-fedora" rhel: Run ovn services with the 'openvswitch' user .travis/linux-build.sh | 17 +- .travis/osx-build.sh | 13 +- Documentation/intro/install/fedora.rst | 13 +- Documentation/intro/install/general.rst | 63 ++-- Makefile.am | 30 +- TODO_SPLIT.rst | 2 + acinclude.m4 | 43 +++ configure.ac | 63 ++-- controller-vtep/automake.mk | 2 +- controller/ovn-controller.c | 4 +- include/ovn/version.h.in | 28 ++ lib/.gitignore | 1 + lib/automake.mk | 21 +- lib/ovn-dirs.c.in | 112 +++++++ lib/ovn-dirs.h | 35 ++ lib/ovn-util.c | 24 +- lib/ovn-util.h | 1 + lib/ovsdb_automake.mk | 7 +- m4/{openvswitch.m4 => ovn.m4} | 60 ++-- northd/ovn-northd.c | 9 +- rhel/automake.mk | 5 +- rhel/etc_logrotate.d_ovn | 22 ++ rhel/ovn-fedora.spec.in | 91 ++++-- ...systemd_system_ovn-controller-vtep.service | 15 +- ..._lib_systemd_system_ovn-controller.service | 9 +- .../usr_lib_systemd_system_ovn-northd.service | 15 +- ...are_ovn_scripts_systemd_sysconfig.template | 13 + tests/automake.mk | 6 +- tests/ofproto-macros.at | 4 +- tests/ovn-controller-vtep.at | 12 +- tests/ovn-nbctl.at | 6 +- tests/ovn-sbctl.at | 20 +- tests/ovn.at | 158 ++++----- tests/ovs-macros.at | 1 + tests/ovsdb-macros.at | 2 +- tutorial/automake.mk | 2 +- tutorial/ovs-sandbox | 309 +++++++++--------- utilities/automake.mk | 5 + utilities/ovn-ctl | 86 +++-- utilities/ovn-ctl.8.xml | 12 +- utilities/ovn-lib.in | 204 ++++++++++++ 41 files changed, 1085 insertions(+), 460 deletions(-) create mode 100644 include/ovn/version.h.in create mode 100644 lib/ovn-dirs.c.in create mode 100644 lib/ovn-dirs.h rename m4/{openvswitch.m4 => ovn.m4} (94%) create mode 100644 rhel/etc_logrotate.d_ovn create mode 100644 rhel/usr_share_ovn_scripts_systemd_sysconfig.template create mode 100644 utilities/ovn-lib.in Acked-by: Mark Michelson