[ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory in ovsdb

Wojciechowicz, RobertX robertx.wojciechowicz at intel.com
Tue Jun 28 07:47:39 UTC 2016


Hi,

any comments to this ovs-ctl solution?
Updating OVS DB in this way is OK from OVS point of view?

Br,
Robert

> -----Original Message-----
> From: dev [mailto:dev-bounces at openvswitch.org] On Behalf Of
> Wojciechowicz, RobertX
> Sent: Monday, June 20, 2016 12:17 PM
> To: Ben Pfaff <blp at ovn.org>
> Cc: dev at openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket directory
> in ovsdb
> 
> Hi,
> 
> > -----Original Message-----
> > From: Ben Pfaff [mailto:blp at ovn.org]
> > Sent: Wednesday, June 8, 2016 10:41 PM
> > To: Wojciechowicz, RobertX <robertx.wojciechowicz at intel.com>
> > Cc: dev at openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH v2] ovsdb: Expose vhost-user socket
> directory
> > in ovsdb
> >
> > On Thu, Jun 02, 2016 at 11:25:56AM +0100, Robert Wojciechowicz wrote:
> > > In order to correctly interoperate with Openstack and ODL,
> > > the vhost-user socket directory must be exposed from OVS via OVSDB.
> > > Different distros may package OVS in different ways,
> > > so the locations of these sockets may vary depending on how
> > > ovs-vswitchd has been started. Some clients need information where
> > > the sockets are located when instantiating Qemu virtual machines.
> > > The full vhost-user socket directory is constructed from current
> > > OVS working directory and optionally from specified subdirectory.
> > > This patch exposes vhost-user socket directory in Open_vSwitch
> > > table in other_config column in two following keys:
> > > 1. ovs-run-dir    - OVS working directory
> > > 2. vhost-sock-dir - subdirectory of ovs-run-dir (might be empty)
> > >
> > > Signed-off-by: Robert Wojciechowicz
> <robertx.wojciechowicz at intel.com>
> > >
> > > v1->v2
> > > - moving vswitch-idl.h dependency inside #ifdef block
> > > - sock_dir_subcomponent initialization with ""
> >
> > Same comment as v1: architecturally, ovs-vswitchd only reads
> > other-config columns, it never writes to them.  Please fix.
> 
> If ovs-vswitchd cannot writes to other-config then the only place
> for writing default values to this column I can think of is vswitch
> startup script ovs-ctl.
> Basically I tested in my environment the below solution
> and it seems to solve our issue.
> Is it acceptable approach?
> 
> diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
> index 6bc7ced..8777f50 100755
> --- a/utilities/ovs-ctl.in
> +++ b/utilities/ovs-ctl.in
> @@ -110,6 +110,10 @@ set_system_ids () {
> 
>      set "$@" external-ids:hostname="\"$(hostname)\""
> 
> +    set "$@" other-config:ovs-run-dir="\"$rundir\""
> +
> +    set "$@" other-config:vhost-sock-dir="\"\""
> +
>      if test X"$SYSTEM_TYPE" != X; then
>          set "$@" system-type="\"$SYSTEM_TYPE\""
>      else
> 
> Br,
> Robert
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev


More information about the dev mailing list