Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08B85EB93 for ; Wed, 13 Feb 2013 13:17:36 +0000 (UTC) Received: (qmail 38611 invoked by uid 500); 13 Feb 2013 13:17:35 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 38578 invoked by uid 500); 13 Feb 2013 13:17:35 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 38558 invoked by uid 99); 13 Feb 2013 13:17:35 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Feb 2013 13:17:35 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id F2B5B1C7462; Wed, 13 Feb 2013 13:17:27 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2186041997053676303==" MIME-Version: 1.0 Subject: Re: Review Request: (CLOUDSTACK-1088) EnableStaticNat error will clear the data in database From: "Prasanna Santhanam" To: "Prasanna Santhanam" , "Jessica Wang" , "Chiradeep Vittal" Cc: "cloudstack" , "Wei Zhou" Date: Wed, 13 Feb 2013 13:17:27 -0000 Message-ID: <20130213131727.21521.8962@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Prasanna Santhanam" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/9254/ X-Sender: "Prasanna Santhanam" References: <20130211101019.21521.55453@reviews.apache.org> In-Reply-To: <20130211101019.21521.55453@reviews.apache.org> Reply-To: "Prasanna Santhanam" --===============2186041997053676303== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9254/#review16513 ----------------------------------------------------------- Ship it! commit 2e2ee2f3ed389b1b1a8a89eae8a641314417ca83 Author: Wei Zhou Date: Wed Feb 13 18:42:38 2013 +0530 CLOUDSTACK-1088: EnableStaticNat error will clear the data in database = The issue occur in two conditions = (1) If I use two sessions or browsers to EnableStaticNat on CloudStack UI. one is successful, the other is failed. However, there is no ip in database. = (2) If I use API call EnableStaticNat several times The first time succeed, the second failed, the third succeed. the result is success-fail-success-fail-success-fail, which it is not correct. = Reported-by: Wei Zhou Reviewed-by: https://reviews.apache.org/r/9254/ Signed-off-by: Prasanna Santhanam Applied on master (2e2ee2), 4.1 (f81719e), and 4.0 (a61a2b) - Prasanna Santhanam On Feb. 11, 2013, 10:10 a.m., Wei Zhou wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/9254/ > ----------------------------------------------------------- > = > (Updated Feb. 11, 2013, 10:10 a.m.) > = > = > Review request for cloudstack, Prasanna Santhanam, Jessica Wang, and Chir= adeep Vittal. > = > = > Description > ------- > = > The issue occur in two conditions > (1) If I use two sessions or browsers to EnableStaticNat on CloudStack UI= . one is successful, the other is failed. However, there is no ip in databa= se. > (2) If I use API call EnableStaticNat several times The first time succee= d, the second failed, the third succeed. the result is success-fail-success= -fail-success-fail, which it is not correct. > = > This is because the improperly use of result boolean flag in com.cloud.ne= twork.rules.RulesManagerImpl.enableStaticNat(long, long, long, boolean), th= e table user_ip_address(one_to_one_nat , vm_id) will set to (0,null) when t= he operation failed. > = > For this issue, I add a new flag "updated" to describe whether the table = user_ip_address in database has been changed.. > = > = > This addresses bug CLOUDSTACK-1088. > = > = > Diffs > ----- > = > server/src/com/cloud/network/rules/RulesManagerImpl.java 0a00d22 = > = > Diff: https://reviews.apache.org/r/9254/diff/ > = > = > Testing > ------- > = > Test in following operations > (1) assign a ip to a vm several times. > (2) assign two ip to a vm > (3) assign a ip to two vms > It works well. > = > = > Thanks, > = > Wei Zhou > = > --===============2186041997053676303==--