From patchwork Wed Sep 23 00:51:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 521527 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id D42941401AF for ; Wed, 23 Sep 2015 10:52:21 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 6C4F410A07; Tue, 22 Sep 2015 17:51:39 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 3808B10A09 for ; Tue, 22 Sep 2015 17:51:36 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id B43284203BF for ; Tue, 22 Sep 2015 18:51:35 -0600 (MDT) X-ASG-Debug-ID: 1442969493-09eadd11dc2cf9f0001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id NdGMiHzIAIte0Hsu (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 22 Sep 2015 18:51:35 -0600 (MDT) X-Barracuda-Envelope-From: azhou@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mail-pa0-f53.google.com) (209.85.220.53) by mx1-pf2.cudamail.com with ESMTPS (RC4-SHA encrypted); 23 Sep 2015 00:51:33 -0000 Received-SPF: unknown (mx1-pf2.cudamail.com: Multiple SPF records returned) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.53 Received: by pacfv12 with SMTP id fv12so24365862pac.2 for ; Tue, 22 Sep 2015 17:51:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xn/TI0YhsyezEJIwEGkA5GeXydeRwxMV+UBIGZLYHRM=; b=FppFONr50htZDgtpk4qRQlTuFHzJECuQbEBMV4yyvXPqmMblkBxiUyPoD6ZiN04nCH IB9fqPNOU/PnKi4zjHui06TONSmz7Jle405NTvFJ8yBRaqWIIxccqn/vvXo6P3hi9d+6 bqVRdCUm/rRiWpxAHJSCJTkEXTpXswqW/yjsTT31SQemNePMS3R7bXbx6xlRzQDgFFXV 52qLLhIaf8rSweif/3RXuHhb5WGLeivI5Da/1KatahVNgLViP2k03Z80etTFOgFHesi3 brPMHgPiqVx4/AFiHdLR5PVotZxkOx46cSA8/trSYNuS/IOmTF7Ge07T1rfgSsYoX1E8 Uy3Q== X-Gm-Message-State: ALoCoQkOQc41ldAh2w4eDZSsuYSxdooAJMb2B5HjkhPJ+hwKsunyj0cryXKVvnh/w2v6Ufp3BkEO X-Received: by 10.66.186.141 with SMTP id fk13mr33905556pac.7.1442969492698; Tue, 22 Sep 2015 17:51:32 -0700 (PDT) Received: from ubuntu.localdomain ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id qn5sm4441160pbc.74.2015.09.22.17.51.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Sep 2015 17:51:32 -0700 (PDT) X-CudaMail-Envelope-Sender: azhou@nicira.com X-Barracuda-Apparent-Source-IP: 208.91.1.34 From: Andy Zhou To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-921115464 X-CudaMail-DTE: 092215 X-CudaMail-Originating-IP: 209.85.220.53 Date: Tue, 22 Sep 2015 17:51:17 -0700 X-ASG-Orig-Subj: [##CM-E2-921115464##][PATCH 8/8] ovs-dev.py: add --monitor and -m option Message-Id: <1442969477-11026-8-git-send-email-azhou@nicira.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442969477-11026-1-git-send-email-azhou@nicira.com> References: <1442969477-11026-1-git-send-email-azhou@nicira.com> X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1442969495 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 8/8] ovs-dev.py: add --monitor and -m option X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" 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 Acked-by: Joe Stringer --- utilities/ovs-dev.py | 5 +++++ 1 file changed, 5 insertions(+) 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)