From patchwork Thu Mar 9 13:59:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Wojciechowicz X-Patchwork-Id: 736997 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.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 3vfBq20sXRz9ryT for ; Fri, 10 Mar 2017 00:59:58 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id ABACD95D; Thu, 9 Mar 2017 13:59:55 +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 270DE305 for ; Thu, 9 Mar 2017 13:59:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 85C118E for ; Thu, 9 Mar 2017 13:59:54 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2017 05:59:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,268,1486454400"; d="scan'208";a="942433408" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by orsmga003.jf.intel.com with ESMTP; 09 Mar 2017 05:59:52 -0800 From: Robert Wojciechowicz To: dev@openvswitch.org Date: Thu, 9 Mar 2017 13:59:51 +0000 Message-Id: <1489067991-4407-1-git-send-email-robertx.wojciechowicz@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1> References: <1> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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] [PATCH v2] ovsdb: Expose openvswitch run directory through ovsdb 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 When using vhost-user client or server mode with openstack, neutron needs to be able to construct the fully qualified socket path and pass it to nova. While the relative vhost-user socket directory is exposed via the `Open_vSwitch` table (other_config:vhost-sock-dir), the openvswith run directory is not. As the full socket path is the combination of the openvswitch run directory + relative vhost-user socket dir + interface name without exposing the run directory the full path cannot be calculated. Since `external_ids` column is meant for storing key-value pairs for use by external frameworks that integrate with Open vSwitch it is a perfect place for exposing OVS run directory. So this patch adds to the `Open_vSwitch` table `external_ids` column this key: 1. ovs-run-dir - OVS run directory Signed-off-by: Robert Wojciechowicz Acked-by: Sean K Mooney --- v2: - documenting external-ids:ovs-run-dir in vswitch.xml --- utilities/ovs-ctl.in | 2 ++ vswitchd/vswitch.xml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index e234937..dd5ba65 100755 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -110,6 +110,8 @@ set_system_ids () { set "$@" external-ids:hostname="\"$(hostname -f)\"" + set "$@" external-ids:ovs-run-dir="\"$rundir\"" + if test X"$SYSTEM_TYPE" != X; then set "$@" system-type="\"$SYSTEM_TYPE\"" else diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index a91be59..fa732ed 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -77,6 +77,10 @@ qualified domain name since version 2.6.2. + + The run directory of the running Open vSwitch daemon. + +