]> git.proxmox.com Git - ovs.git/commitdiff
ovs-ctl: Expose openvswitch run directory through ovsdb.
authorRobert Wojciechowicz <robertx.wojciechowicz@intel.com>
Thu, 9 Mar 2017 13:59:51 +0000 (13:59 +0000)
committerBen Pfaff <blp@ovn.org>
Fri, 7 Apr 2017 22:07:52 +0000 (15:07 -0700)
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 in other_config:vhost-sock-dir, the openvswitch run
directory that it is relative to is not.  This patch adds it to the
Open_vSwitch table as external_ids:rundir.

Signed-off-by: Robert Wojciechowicz <robertx.wojciechowicz@intel.com>
Acked-by: Sean K Mooney <sean.k.mooney@intel.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
utilities/ovs-ctl.in
vswitchd/vswitch.xml

index e234937b1125a1fbc67fa0b7081f09c14d9793ba..575ffa0394a5ca382b897f2170a257bbc2133824 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2016 Nicira, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -110,6 +110,8 @@ set_system_ids () {
 
     set "$@" external-ids:hostname="\"$(hostname -f)\""
 
+    set "$@" external-ids:rundir="\"$rundir\""
+
     if test X"$SYSTEM_TYPE" != X; then
         set "$@" system-type="\"$SYSTEM_TYPE\""
     else
index 14297bf9ad983fef0b962d8f8415ef276c1303d7..870c8131831716464f50fc9b4e088e4460803bc2 100644 (file)
         qualified domain name since version 2.6.2.
       </column>
 
+      <column name="external_ids" key="rundir">
+        In Open vSwitch 2.8 and later, the run directory of the running Open
+        vSwitch daemon.  This directory is used for runtime state such as
+        control and management sockets.  The value of <ref
+        column="other_config" key="vhost-sock-dir"/> is relative to this
+        directory.
+      </column>
+
       <column name="other_config" key="stats-update-interval"
               type='{"type": "integer", "minInteger": 5000}'>
         <p>
       <column name="other_config" key="vhost-sock-dir"
               type='{"type": "string"}'>
         <p>
-          Specifies the path to the vhost-user unix domain socket files. This
-          path must exist and be a subdirectory tree of the Open vSwitch
-          run directory.
+          Specifies a relative path from <ref column="external_ids"
+          key="rundir"/> to the vhost-user unix domain socket files.  If this
+          value is unset, the sockets are put directly in <ref
+          column="external_ids" key="rundir"/>.
         </p>
         <p>
-          Defaults to the working directory of the application. Changing this
-          value requires restarting the daemon.
+          Changing this value requires restarting the daemon.
         </p>
       </column>