From patchwork Mon Sep 14 22:54:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 517615 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 1E0A2140D16 for ; Tue, 15 Sep 2015 08:55:31 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 9B63410907; Mon, 14 Sep 2015 15:54:40 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v1.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id CEA3D1098E for ; Mon, 14 Sep 2015 15:54:37 -0700 (PDT) Received: from bar3.cudamail.com (bar1 [192.168.15.1]) by mx3v1.cudamail.com (Postfix) with ESMTP id 51006618E99 for ; Mon, 14 Sep 2015 16:54:37 -0600 (MDT) X-ASG-Debug-ID: 1442271277-03dd7b6b8a06aa0001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar3.cudamail.com with ESMTP id NZZr6a6hBAFu8S1O (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 14 Sep 2015 16:54:37 -0600 (MDT) X-Barracuda-Envelope-From: azhou@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mail-pa0-f53.google.com) (209.85.220.53) by mx3-pf2.cudamail.com with ESMTPS (RC4-SHA encrypted); 14 Sep 2015 22:54:36 -0000 Received-SPF: unknown (mx3-pf2.cudamail.com: Multiple SPF records returned) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.53 Received: by padhy16 with SMTP id hy16so155946627pad.1 for ; Mon, 14 Sep 2015 15:54:36 -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=4gCDRLCY0F2GgHq6HaWtBy2cb7zwVauj/7BNCSqlaJ8=; b=hmtT6Yfc6jNCZRBB8+QLQdP/LivYk+Ejxwe+wWwKYaOY5EU+IX529BlflCfuN7wz1j kZRSgrnWxBo/W2Qjr9rgs8iqgPwkLEgtwwKFZctz8hHcwxksgHoZKHRUqXEyLhTSTd6h AsS2kyy011u5idUS+zb6ePgU5V1llijQ7G08gySi5D/LI4A/f9H/2KwQ1ACu7Xz1Qo2t LqCYxNZLHn88CpyvWQvZr7hbEkO7aVoCF1NOQqZ32mzFAjvHNQzC3hwJeVTasCPqThwU oA5hTs+w8XjF/Erny+jl5aq8iGdtrBOMAA8cUPlOzfQWiu5RhnKEnwyY8mzPOBK/oAlD z2VQ== X-Gm-Message-State: ALoCoQkB+DvxivAXgp9Kqsv2t2dcJ57L+we/b8H/d8eyZqPI4ksUeaMyiMKOdt1yx4k9T84m+4HB X-Received: by 10.68.244.34 with SMTP id xd2mr39770122pbc.50.1442271276437; Mon, 14 Sep 2015 15:54:36 -0700 (PDT) Received: from ubuntu.localdomain ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id ox2sm18121426pbb.87.2015.09.14.15.54.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Sep 2015 15:54:36 -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-V2-913060911 X-CudaMail-DTE: 091415 X-CudaMail-Originating-IP: 209.85.220.53 Date: Mon, 14 Sep 2015 15:54:14 -0700 X-ASG-Orig-Subj: [##CM-V2-913060911##][v3 10/10] ovs-dev.py: add --monitor and -m option Message-Id: <1442271254-27897-11-git-send-email-azhou@nicira.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442271254-27897-1-git-send-email-azhou@nicira.com> References: <1442271254-27897-1-git-send-email-azhou@nicira.com> X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1442271277 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] [v3 10/10] 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 Vswichd with --monitor option. This features is useful for testing daemon monitoring, and in conjunction with --user option. Signed-off-by: Andy Zhou --- utilities/ovs-dev.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py index 45fa38b..4e9c58e 100755 --- a/utilities/ovs-dev.py +++ b/utilities/ovs-dev.py @@ -243,6 +243,9 @@ def run(): if (options.user != "root:root"): opts = ["--user", options.user] + opts + if (options.monitor): + opts = ["--monitor"] + opts + _sh(*(["ovsdb-server", "--remote=punix:%s/run/db.sock" % RUNDIR, "--remote=db:Open_vSwitch,Open_vSwitch,manager_options", @@ -430,6 +433,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)