[ovs-dev,8/8] ovs-dev.py: add --monitor and -m option
diff mbox

Message ID 1442969477-11026-8-git-send-email-azhou@nicira.com
State Accepted
Headers show

Commit Message

Andy Zhou Sept. 23, 2015, 12:51 a.m. UTC
Runs ovsdb-server and ovs-vswitch with --monitor option. This feature
is useful for testing daemon monitoring together with --user option.

Signed-off-by: Andy Zhou <azhou@nicira.com>
---
 utilities/ovs-dev.py | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Joe Stringer Oct. 1, 2015, 12:30 a.m. UTC | #1
On 22 September 2015 at 17:51, Andy Zhou <azhou@nicira.com> wrote:
> Runs ovsdb-server and ovs-vswitch with --monitor option. This feature
> is useful for testing daemon monitoring together with --user option.
>
> Signed-off-by: Andy Zhou <azhou@nicira.com>

LGTM

Acked-by: Joe Stringer <joestringer@nicira.com>

Patch
diff mbox

diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
index 1f9dbd7..fb8a69d 100755
--- a/utilities/ovs-dev.py
+++ b/utilities/ovs-dev.py
@@ -244,6 +244,9 @@  def run():
         _sh("chown", options.user, "-R", RUNDIR);
         opts = ["--user", options.user] + opts
 
+    if (options.monitor):
+        opts = ["--monitor"] + opts
+
     _sh(*(["ovsdb-server",
            "--remote=punix:%s/run/db.sock" % VARDIR,
            "--remote=db:Open_vSwitch,Open_vSwitch,manager_options",
@@ -431,6 +434,8 @@  def main():
                      help="run all daemons as a non root user")
     group.add_option("-u", dest="as_me", action="store_true",
                      help="set --user to the current user")
+    group.add_option("-m", "--monitor", dest="monitor", action="store_true",
+                     help="run daemons with --monitor option")
 
     parser.add_option_group(group)