Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED1EF11812 for ; Thu, 7 Aug 2014 07:42:11 +0000 (UTC) Received: (qmail 94349 invoked by uid 500); 7 Aug 2014 07:42:11 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 94321 invoked by uid 500); 7 Aug 2014 07:42:11 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 94307 invoked by uid 99); 7 Aug 2014 07:42:10 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Aug 2014 07:42:10 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id D3FB61DB42E; Thu, 7 Aug 2014 07:41:56 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4527542252884358266==" MIME-Version: 1.0 Subject: Re: Review Request 24378: CLOUDSTACK-7268: Ignore "already exists" error in createEgressFirewallRule From: "John Dilley" To: "Santhosh Edukulla" Cc: "John Dilley" , "cloudstack" Date: Thu, 07 Aug 2014 07:41:56 -0000 Message-ID: <20140807074156.1587.59279@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "John Dilley" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/24378/ X-Sender: "John Dilley" References: <20140807072132.1595.11874@reviews.apache.org> In-Reply-To: <20140807072132.1595.11874@reviews.apache.org> Reply-To: "John Dilley" X-ReviewRequest-Repository: cloudstack-git --===============4527542252884358266== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > On Aug. 7, 2014, 7:21 a.m., Santhosh Edukulla wrote: > > tools/marvin/marvin/lib/base.py, line 350 > > > > > > may be to keep simple check if not string in e.. and raise, pass can be removed. As well, is the exception thrown is only cloudstackAPIException or some other type? add a default handler if possible and fail in case so? > > > > Do a lower comparison of message again for both left and right hand vlaue. The failure we want to ignore will always be cloudstackAPI exception. Any other type of exception will not match an except block, so will be raised rather than handled. - John ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/24378/#review49877 ----------------------------------------------------------- On Aug. 7, 2014, 7:41 a.m., John Dilley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/24378/ > ----------------------------------------------------------- > > (Updated Aug. 7, 2014, 7:41 a.m.) > > > Review request for cloudstack and Santhosh Edukulla. > > > Bugs: CLOUDSTACK-7268 > https://issues.apache.org/jira/browse/CLOUDSTACK-7268 > > > Repository: cloudstack-git > > > Description > ------- > > Although we could search for an existing firewall rule, this fix is simpler, and also less prone to race conditions if multiple threads are running. > > > Diffs > ----- > > tools/marvin/marvin/lib/base.py 3a1f7e6 > > Diff: https://reviews.apache.org/r/24378/diff/ > > > Testing > ------- > > Tested on KVM advanced zone > > > Thanks, > > John Dilley > > --===============4527542252884358266==--