From patchwork Thu Mar 2 14:40:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Wojciechowicz X-Patchwork-Id: 734619 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 3vYw2z3nM1z9s7f for ; Fri, 3 Mar 2017 01:40:27 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id ABD9E95D; Thu, 2 Mar 2017 14:40:23 +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 45F74949 for ; Thu, 2 Mar 2017 14:40:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C8F28157 for ; Thu, 2 Mar 2017 14:40:21 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2017 06:40:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,231,1484035200"; d="scan'208";a="70822874" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by orsmga005.jf.intel.com with ESMTP; 02 Mar 2017 06:40:20 -0800 From: Robert Wojciechowicz To: dev@openvswitch.org Date: Thu, 2 Mar 2017 14:40:19 +0000 Message-Id: <1488465619-19890-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] 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 --- utilities/ovs-ctl.in | 2 ++ 1 file changed, 2 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