summaryrefslogtreecommitdiff
path: root/ovn
diff options
context:
space:
mode:
authorAaron Conole <aconole@redhat.com>2018-08-08 10:36:10 -0400
committerBen Pfaff <blp@ovn.org>2018-08-21 14:20:20 -0700
commit08c05ad2d975b9485f3a1ac1c1737b48dad9269f (patch)
tree6efe459d65c5ad6726e328e1581f5791a0a3082d /ovn
parent22c33c3039321dfd331530e34a0d9080801e30e8 (diff)
downloadopenvswitch-08c05ad2d975b9485f3a1ac1c1737b48dad9269f.tar.gz
ovn-ctl: allow configuring user:group for daemons
Add two options, one for controlling the ovs daemon user/group, and the other for controlling the ovn daemon user/group. This allows a fine-grained split between OVN and OVS daemons, and keeps the syntax and user/group separation from ovs-ctl when running ovn-ctl. Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn')
-rwxr-xr-xovn/utilities/ovn-ctl14
-rw-r--r--ovn/utilities/ovn-ctl.8.xml2
2 files changed, 16 insertions, 0 deletions
diff --git a/ovn/utilities/ovn-ctl b/ovn/utilities/ovn-ctl
index 296e5b82c..3ff0df68e 100755
--- a/ovn/utilities/ovn-ctl
+++ b/ovn/utilities/ovn-ctl
@@ -172,6 +172,8 @@ $cluster_remote_port
set "$@" --remote=punix:$sock --pidfile=$pid
set "$@" --unixctl=ovn${db}_db.ctl
+ [ "$OVS_USER" != "" ] && set "$@" --user "$OVS_USER"
+
if test X"$detach" != Xno; then
set "$@" --detach --monitor
else
@@ -293,6 +295,8 @@ start_northd () {
set "$@" --log-file=$OVN_NORTHD_LOGFILE
fi
+ [ "$OVN_USER" != "" ] && set "$@" --user "$OVN_USER"
+
set "$@" $OVN_NORTHD_LOG $ovn_northd_params
OVS_RUNDIR=${OVN_RUNDIR} start_daemon "$OVN_NORTHD_PRIORITY" "$OVN_NORTHD_WRAPPER" "$@"
@@ -314,6 +318,9 @@ start_controller () {
if test X"$OVN_CONTROLLER_SSL_BOOTSTRAP_CA_CERT" != X; then
set "$@" --bootstrap-ca-cert=$OVN_CONTROLLER_SSL_BOOTSTRAP_CA_CERT
fi
+
+ [ "$OVN_USER" != "" ] && set "$@" --user "$OVN_USER"
+
OVS_RUNDIR=${OVN_RUNDIR} start_daemon "$OVN_CONTROLLER_PRIORITY" "$OVN_CONTROLLER_WRAPPER" "$@"
}
@@ -332,6 +339,9 @@ start_controller_vtep () {
if test X"$OVN_CONTROLLER_SSL_BOOTSTRAP_CA_CERT" != X; then
set "$@" --bootstrap-ca-cert=$OVN_CONTROLLER_SSL_BOOTSTRAP_CA_CERT
fi
+
+ [ "$OVN_USER" != "" ] && set "$@" --user "$OVN_USER"
+
OVS_RUNDIR=${OVN_RUNDIR} start_daemon "$OVN_CONTROLLER_PRIORITY" "$OVN_CONTROLLER_WRAPPER" "$@"
}
@@ -429,6 +439,8 @@ set_defaults () {
OVS_RUNDIR=${OVS_RUNDIR:-${rundir}}
OVN_RUNDIR=${OVN_RUNDIR:-${OVS_RUNDIR}}
+ OVN_USER=
+ OVS_USER=
OVN_CONTROLLER_LOG="-vconsole:emer -vsyslog:err -vfile:info"
OVN_NORTHD_LOG="-vconsole:emer -vsyslog:err -vfile:info"
@@ -535,6 +547,8 @@ Options:
--ovn-northd-logfile=STRING ovn northd process log file (default: $OVN_NORTHD_LOGFILE)
--ovn-nb-log=STRING ovn NB ovsdb-server processes logging params (default: $OVN_NB_LOG)
--ovn-sb-log=STRING ovn SB ovsdb-server processes logging params (default: $OVN_SB_LOG)
+ --ovn-user="user[:group]" pass the --user flag to the ovn daemons
+ --ovs-user="user[:group]" pass the --user flag to ovs daemons
-h, --help display this help message
File location options:
diff --git a/ovn/utilities/ovn-ctl.8.xml b/ovn/utilities/ovn-ctl.8.xml
index 02235fe1e..3b0e67a45 100644
--- a/ovn/utilities/ovn-ctl.8.xml
+++ b/ovn/utilities/ovn-ctl.8.xml
@@ -44,6 +44,8 @@
<p><code>--ovn-northd-wrapper=<var>WRAPPER</var></code></p>
<p><code>--ovn-controller-priority=<var>NICE</var></code></p>
<p><code>--ovn-controller-wrapper=<var>WRAPPER</var></code></p>
+ <p><code>--ovn-user=<var>USER:GROUP</var></code></p>
+ <p><code>--ovs-user=<var>USER:GROUP</var></code></p>
<p><code>-h</code> | <code>--help</code></p>
<h1>File location options</h1>