Hi,
    taking a small look at it, maybe the best and easy option (for now)
could be to allow netdev group to write to db.sock file, without changing
anything else in the code. This an be down in the init scripts.
Find attached a possible patch for it. Comments are welcomed.

Ghe Rivero

-- 
Ghe Rivero
*OpenStack & Distribution Engineer
**www.stackops.com | * ghe.riv...@stackops.com <diego.parri...@stackops.com>
** | +34 625 63 45 23 | skype:ghe.rivero*
* <http://www.stackops.com/>
*

*

******************** ADVERTENCIA LEGAL ********************
Le informamos, como destinatario de este mensaje, que el correo electrónico
y las comunicaciones por medio de Internet no permiten asegurar ni
garantizar la confidencialidad de los mensajes transmitidos, así como
tampoco su integridad o su correcta recepción, por lo que STACKOPS
TECHNOLOGIES S.L. no asume responsabilidad alguna por tales circunstancias.
Si no consintiese en la utilización del correo electrónico o de las
comunicaciones vía Internet le rogamos nos lo comunique y ponga en nuestro
conocimiento de manera inmediata. Este mensaje va dirigido, de manera
exclusiva, a su destinatario y contiene información confidencial y sujeta
al secreto profesional, cuya divulgación no está permitida por la ley. En
caso de haber recibido este mensaje por error, le rogamos que, de forma
inmediata, nos lo comunique mediante correo electrónico remitido a nuestra
atención y proceda a su eliminación, así como a la de cualquier documento
adjunto al mismo. Asimismo, le comunicamos que la distribución, copia o
utilización de este mensaje, o de cualquier documento adjunto al mismo,
cualquiera que fuera su finalidad, están prohibidas por la ley.

***************** PRIVILEGED AND CONFIDENTIAL ****************
We hereby inform you, as addressee of this message, that e-mail and
Internet do not guarantee the confidentiality, nor the completeness or
proper reception of the messages sent and, thus, STACKOPS TECHNOLOGIES S.L.
does not assume any liability for those circumstances. Should you not agree
to the use of e-mail or to communications via Internet, you are kindly
requested to notify us immediately. This message is intended exclusively
for the person to whom it is addressed and contains privileged and
confidential information protected from disclosure by law. If you are not
the addressee indicated in this message, you should immediately delete it
and any attachments and notify the sender by reply e-mail. In such case,
you are hereby notified that any dissemination, distribution, copying or
use of this message or any attachments, for any purpose, is strictly
prohibited by law.
--- openvswitch-switch.init.orig	2012-02-15 21:15:11.000000000 +0100
+++ openvswitch-switch.init	2012-02-15 21:19:43.000000000 +0100
@@ -64,6 +64,10 @@
     "$@" || exit $?
 
     ovs_ctl --protocol=gre enable-protocol
+    if test -f $DBSOCK; then
+	chmod g+rw $DBSOCK
+	chgrp $GROUP_ID $DBSOCK
+    fi
 }
 
 stop () {
--- openvswitch-switch.template.orig	2012-02-15 21:17:01.000000000 +0100
+++ openvswitch-switch.template	2012-02-15 21:22:52.000000000 +0100
@@ -6,3 +6,9 @@
 # BRCOMPAT: If 'yes' and the openvswitch-brcompat package is installed, then
 # Linux bridge compatibility will be enabled.
 # BRCOMPAT=no
+
+# DBSOCK: db.sock file location
+DBSOCK=/var/run/openvswitch/db.sock
+
+# GROUP_ID: group who can access db.sock
+GROUP_ID=netdev

Reply via email to