diff mbox

[ovs-dev] ovsdb: Expose openvswitch run directory through ovsdb

Message ID 1488465619-19890-1-git-send-email-robertx.wojciechowicz@intel.com
State Changes Requested
Headers show

Commit Message

Robert Wojciechowicz March 2, 2017, 2:40 p.m. UTC
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 <robertx.wojciechowicz@intel.com>
Acked-by: Sean K Mooney <sean.k.mooney@intel.com>
---
 utilities/ovs-ctl.in | 2 ++
 1 file changed, 2 insertions(+)

Comments

Ben Pfaff March 9, 2017, 5:31 a.m. UTC | #1
On Thu, Mar 02, 2017 at 02:40:19PM +0000, Robert Wojciechowicz wrote:
> 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 <robertx.wojciechowicz@intel.com>
> Acked-by: Sean K Mooney <sean.k.mooney@intel.com>

Please add documentation for this in the Open_vSwitch table in
vswitch.xml.
diff mbox

Patch

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