[ovs-discuss] How to run ovs-vswitchd as non-root

Ben Pfaff blp at nicira.com
Fri Sep 23 02:35:25 UTC 2011


ovs-vsctl only changes the database.  The database update completes
successfully.

On Thu, Sep 22, 2011 at 06:15:46PM -0700, Aishwarya wrote:
> Ok.. Apart from this, I also notice if I use ovs-vsctl add br0 without sudo,
> it does not give me any error immediately, but when I try to set an ip
> address for the br0 interface with sudo ifconfig, it says "no such device
> exists". Is this because when run without sudo, vsctl add-br is not doing
> this correctly? It may be helpful to see an error message in such a case.
> 
> Thanks,
> AIsh
> 
> 
> On Thu, Sep 22, 2011 at 4:18 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > Yes.
> >
> > Only root is allowed to change the kernel flow tables, for example.
> >
> > On Thu, Sep 22, 2011 at 04:00:34PM -0700, Aishwarya wrote:
> > > Hi Ben,
> > >
> > > Using OVS_RUNDIR works for me. But are you saying running vswitchd as non
> > > root will cause other issues in the functionality?
> > >
> > > Thanks,
> > > Aish
> > >
> > > On Thu, Sep 22, 2011 at 3:27 PM, Ben Pfaff <blp at nicira.com> wrote:
> > >
> > > > On Thu, Sep 22, 2011 at 03:05:57PM -0700, Aishwarya wrote:
> > > > > ovsdb-server gives an option to specify the ctl socket path with
> > > > --unixctl
> > > > > option. So, this and specifying the pid file path make it possible to
> > run
> > > > > this from a non-root account or without sudo. Is there a way that
> > > > > ovs-vswiitchd can also be run without sudo? Right now, I get this
> > error:
> > > > > ovs-vswitchd: could not initialize control socket
> > > > > /usr/local/var/run/openvswitch/ovs-vswitchd.20342.ctl (Permission
> > > > denied).
> > > >
> > > > You can specify the OVS_RUNDIR environment variable.
> > > >
> > > > There are other reasons that ovs-vswitchd normally requires root, so
> > > > it might not help.
> > > >
> >



More information about the discuss mailing list