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 431DE11CE3 for ; Tue, 2 Sep 2014 19:16:17 +0000 (UTC) Received: (qmail 67334 invoked by uid 500); 2 Sep 2014 19:16:16 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 67284 invoked by uid 500); 2 Sep 2014 19:16:16 -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 67257 invoked by uid 99); 2 Sep 2014 19:16:16 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2014 19:16:16 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 84F291DD371; Tue, 2 Sep 2014 19:16:15 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7315819618726318461==" MIME-Version: 1.0 Subject: Re: Review Request 25248: Fix NPE in case VM is started and its template does not exist anymore From: "Rohit Yadav" To: "edison su" , "Darren Shepherd" , "Sebastien Goasguen" , "Hugo Trippaers" , "Alena Prokharchyk" Cc: "Nitin Mehta" , "Rohit Yadav" , "cloudstack" Date: Tue, 02 Sep 2014 19:16:15 -0000 Message-ID: <20140902191615.16961.95978@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Rohit Yadav" X-ReviewGroup: cloudstack X-ReviewRequest-URL: https://reviews.apache.org/r/25248/ X-Sender: "Rohit Yadav" References: <20140902190100.16961.30892@reviews.apache.org> In-Reply-To: <20140902190100.16961.30892@reviews.apache.org> Reply-To: "Rohit Yadav" X-ReviewRequest-Repository: cloudstack-git --===============7315819618726318461== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On Sept. 2, 2014, 7:01 p.m., Nitin Mehta wrote: > > engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java, line 814 > > > > > > Checking for template==null masks the whole problem. > > 1. Such validations should have happenned in the deployvm api layer if it comes from that api. > > 2. If its coming from a startvm api its perfectly fine to have the template removed since the volume already exists. > > 3. If you see how template is used below...if it has to 'create' a new volume the template shouldnt be removed but again the validations should be in api layer. So, I can read code too, upper layers are not passing the template so what do you propose? How may I fix this then? - Rohit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/25248/#review52059 ----------------------------------------------------------- On Sept. 2, 2014, 1:53 p.m., Rohit Yadav wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/25248/ > ----------------------------------------------------------- > > (Updated Sept. 2, 2014, 1:53 p.m.) > > > Review request for cloudstack, Alena Prokharchyk, edison su, Darren Shepherd, Sebastien Goasguen, and Hugo Trippaers. > > > Bugs: CLOUDSTACK-6945 > https://issues.apache.org/jira/browse/CLOUDSTACK-6945 > > > Repository: cloudstack-git > > > Description > ------- > > Fixes https://issues.apache.org/jira/browse/CLOUDSTACK-6945 > > > Diffs > ----- > > engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java 2fd7a52 > > Diff: https://reviews.apache.org/r/25248/diff/ > > > Testing > ------- > > Builds cleanly, will throw resource not available exception when template does not exist. > > > Thanks, > > Rohit Yadav > > --===============7315819618726318461==--