Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C011A200D3E for ; Thu, 16 Nov 2017 14:25:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BE7F5160BE5; Thu, 16 Nov 2017 13:25:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DCDB0160BE6 for ; Thu, 16 Nov 2017 14:25:05 +0100 (CET) Received: (qmail 69302 invoked by uid 500); 16 Nov 2017 13:25:05 -0000 Mailing-List: contact issues-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 issues@cloudstack.apache.org Received: (qmail 69293 invoked by uid 500); 16 Nov 2017 13:25:04 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 69290 invoked by uid 99); 16 Nov 2017 13:25:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 13:25:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1CF511A087F for ; Thu, 16 Nov 2017 13:25:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id poRL8mD_LoCt for ; Thu, 16 Nov 2017 13:25:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A83445FD61 for ; Thu, 16 Nov 2017 13:25:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E497DE126D for ; Thu, 16 Nov 2017 13:25:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 59689240E6 for ; Thu, 16 Nov 2017 13:25:00 +0000 (UTC) Date: Thu, 16 Nov 2017 13:25:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-10144) NPE in listVlanIpRanges MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Nov 2017 13:25:06 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-10144?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16255293#comment-16255293 ]=20 ASF GitHub Bot commented on CLOUDSTACK-10144: --------------------------------------------- blueorangutan commented on issue #2330: CLOUDSTACK-10144: fix possible NPE = in listVlanIpRanges URL: https://github.com/apache/cloudstack/pull/2330#issuecomment-344921395 =20 =20 @rhtyd a Jenkins job has been kicked to build packages. I'll keep you po= sted as I make progress. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > NPE in listVlanIpRanges > ----------------------- > > Key: CLOUDSTACK-10144 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-101= 44 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: API > Reporter: Ren=C3=A9 Moser > Assignee: Ren=C3=A9 Moser > > After deletion of a project with dedicated public IPs without errors, the= listVlanIpRanges fails. > In the log, we see this null pointer exception: > 2017-11-16 10:21:15,047 ERROR [cloud.api.ApiServer] (catalina-exec-15:ctx= -8dab3c6e ctx-b242a5df) unhandled exception executing api command: [Ljava.l= ang.String;@3c71540 > java.lang.NullPointerException > at com.cloud.api.ApiResponseHelper.populateAccount(ApiResponseHelper.java= :2198) > at com.cloud.api.ApiResponseHelper.createVlanIpRangeResponse(ApiResponseH= elper.java:620) > at org.apache.cloudstack.api.command.admin.vlan.ListVlanIpRangesCmd.execu= te(ListVlanIpRangesCmd.java:149) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:141) > at com.cloud.api.ApiServer.queueCommand(ApiServer.java:704) > at com.cloud.api.ApiServer.handleRequest(ApiServer.java:529) > at com.cloud.api.ApiServlet.processRequestInContext(ApiServlet.java:288) > at com.cloud.api.ApiServlet$1.run(ApiServlet.java:119) > at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.cal= l(DefaultManagedContext.java:56) > at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callW= ithContext(DefaultManagedContext.java:103) > at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWi= thContext(DefaultManagedContext.java:53) > at com.cloud.api.ApiServlet.processRequest(ApiServlet.java:116) > at com.cloud.api.ApiServlet.doGet(ApiServlet.java:78) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli= cationFilterChain.java:290) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi= lterChain.java:206) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa= lve.java:233) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa= lve.java:191) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja= va:127) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja= va:102) > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:5= 55) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv= e.java:109) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java= :299) > at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor= .java:889) > at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.pro= cess(Http11NioProtocol.java:732) > at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint= .java:2274) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.j= ava:1145) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.= java:615) > at java.lang.Thread.run(Thread.java:745) > The related code is: > 2193 private void populateAccount(ControlledEntityResponse response, long= accountId) { > 2194 Account account =3D ApiDBUtils.findAccountById(accountId); > 2195 if (account.getType() =3D=3D Account.ACCOUNT_TYPE_PROJECT) { > 2196 // find the project > 2197 Project project =3D ApiDBUtils.findProjectByProjectAccountId(account= .getId()); > 2198 response.setProjectId(project.getUuid()); > 2199 response.setProjectName(project.getName()); > 2200 response.setAccountName(account.getAccountName()); > 2201 } else { > 2202 response.setAccountName(account.getAccountName()); > 2203 } > 2204 } > So the null pointer is the project which can not be found. It seems that = the project deletion cleanup didn't process the vlanIpRange correctly. And = because the project is deleted findProjectByProjectAccountId can not find t= he project. > When we go further the log below to trace the project deletion, we see a = rollback in releaseAccountSpecificVirtualRanges. However, unfortunately we = don't see the reason of the rollback. > 2017-11-16 09:16:59,055 INFO [jobs.impl.AsyncJobMonitor] (API-Job-Executo= r-121:ctx-56a662aa job-1371174) Add job-1371174 into job monitoring > 2017-11-16 09:16:59,060 DEBUG [jobs.impl.AsyncJobManagerImpl] (catalina-e= xec-63:ctx-242e4ae4 ctx-140e1822) submit async job-1371174, details: AsyncJ= obVO {id:1371174, userId: 222, accountId: 122, instanceType: None, instance= Id: null, cmd: org.apache.cloudstack.api.command.user.project.DeleteProject= Cmd, cmdInfo: {"id":"6049f66d-e0a4-45ff-a1cc-19ad523996b3","response":"json= ","ctxDetails":"{\"com.cloud.projects.Project\":\"6049f66d-e0a4-45ff-a1cc-1= 9ad523996b3\"}","cmdEventType":"PROJECT.DELETE","ctxUserId":"222","httpmeth= od":"GET","_":"1510820218991","uuid":"6049f66d-e0a4-45ff-a1cc-19ad523996b3"= ,"ctxAccountId":"122","ctxStartEventId":"5426789"}, cmdVersion: 0, status: = IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 34505= 0593418, completeMsid: null, lastUpdated: null, lastPolled: null, created: = null} > 2017-11-16 09:16:59,061 DEBUG [jobs.impl.AsyncJobManagerImpl] (API-Job-Ex= ecutor-121:ctx-56a662aa job-1371174) Executing AsyncJobVO {id:1371174, user= Id: 222, accountId: 122, instanceType: None, instanceId: null, cmd: org.apa= che.cloudstack.api.command.user.project.DeleteProjectCmd, cmdInfo: {"id":"6= 049f66d-e0a4-45ff-a1cc-19ad523996b3","response":"json","ctxDetails":"{\"com= .cloud.projects.Project\":\"6049f66d-e0a4-45ff-a1cc-19ad523996b3\"}","cmdEv= entType":"PROJECT.DELETE","ctxUserId":"222","httpmethod":"GET","_":"1510820= 218991","uuid":"6049f66d-e0a4-45ff-a1cc-19ad523996b3","ctxAccountId":"122",= "ctxStartEventId":"5426789"}, cmdVersion: 0, status: IN_PROGRESS, processSt= atus: 0, resultCode: 0, result: null, initMsid: 345050593418, completeMsid:= null, lastUpdated: null, lastPolled: null, created: null} > 2017-11-16 09:16:59,080 DEBUG [cloud.projects.ProjectManagerImpl] (API-Jo= b-Executor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Marking project id=3D= 74 with state Disabled as a part of project delete... > 2017-11-16 09:16:59,097 DEBUG [cloud.projects.ProjectManagerImpl] (API-Jo= b-Executor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Deleting projects Pro= ject[74|name=3DCLAVISIT_CLOUD_REPOSITORY_PROD|domainid=3D311] internal acco= unt id=3D490 as a part of project cleanup... > 2017-11-16 09:16:59,109 DEBUG [cloud.user.AccountManagerImpl] (API-Job-Ex= ecutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Removed account 490 > 2017-11-16 09:16:59,118 DEBUG [cloud.user.AccountManagerImpl] (API-Job-Ex= ecutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Successfully deleted snap= shots directories for all volumes under account 490 across all zones > 2017-11-16 09:16:59,143 INFO [cloud.template.HypervisorTemplateAdapter] (= API-Job-Executor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Delete template= from image store: 5aa44ccb-0ca9-4806-9d18-0de47dffd947 > 2017-11-16 09:16:59,145 DEBUG [storage.image.TemplateDataFactoryImpl] (AP= I-Job-Executor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) template 962 is a= lready in store:3, type:Image > 2017-11-16 09:16:59,160 DEBUG [agent.transport.Request] (API-Job-Executor= -121:ctx-56a662aa job-1371174 ctx-3afdce4f) Seq 104-2582814386297057482: Se= nding { Cmd , MgmtId: 345050593418, via: 104(s-5878-VM), Ver: v1, Flags: 10= 0011, [{"org.apache.cloudstack.storage.command.DeleteCommand":{"data":{"org= .apache.cloudstack.storage.to.TemplateObjectTO":{"path":"template/tmpl/490/= 962/27e74739-4b54-3493-9250-2f211119327e.ova","origUrl":"http://install.cla= visnet.com/raw.ova","uuid":"c15544f0-0b4b-479c-a436-46689ef1a67d","id":962,= "format":"OVA","accountId":490,"checksum":"8b230e9f9cabb4369281edc2abc344e4= ","hvm":true,"displayText":"w2k8r2 Kofax Test AD Srv OS","imageDataStore":{= "com.cloud.agent.api.to.NfsTO":{"_url":"nfs://b-cs-secstor.stor.int//ifs/ec= o/virt/cloud/fs_cs_zone01_secstor","_role":"Image"}},"name":"962-490-17aff0= ef-3225-3fbf-af31-f7aab56f3253","hypervisorType":"VMware"}},"wait":0}}] } > 2017-11-16 09:16:59,607 DEBUG [agent.transport.Request] (API-Job-Executor= -121:ctx-56a662aa job-1371174 ctx-3afdce4f) Seq 104-2582814386297057482: Re= ceived: { Ans: , MgmtId: 345050593418, via: 104, Ver: v1, Flags: 10, { Answ= er } } > 2017-11-16 09:16:59,642 DEBUG [cloud.user.AccountManagerImpl] (API-Job-Ex= ecutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Access granted to Acct[3b= 9e83ea-4ae1-4c65-8995-7b67e82e4500-stxt-adm] to Domain:311/Drittkunden/clav= isit/ by AffinityGroupAccessChecker > 2017-11-16 09:16:59,656 DEBUG [cloud.user.AccountManagerImpl] (API-Job-Ex= ecutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Expunging # of vms (accou= ntId=3D490): 0 > 2017-11-16 09:16:59,684 INFO [cloud.user.AccountManagerImpl] (API-Job-Exe= cutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) deleteAccount: Deleted 1 n= etwork groups for account 490 > 2017-11-16 09:16:59,685 INFO [cloud.user.AccountManagerImpl] (API-Job-Exe= cutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) deleteAccount: Deleted 0 a= ffinity groups for account 490 > 2017-11-16 09:16:59,685 DEBUG [cloud.user.AccountManagerImpl] (API-Job-Ex= ecutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Deleting networks for acc= ount 490 > 2017-11-16 09:16:59,687 DEBUG [cloud.user.AccountManagerImpl] (API-Job-Ex= ecutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Deleting vpcs for account= 490 > 2017-11-16 09:16:59,690 DEBUG [cloud.user.AccountManagerImpl] (API-Job-Ex= ecutor-121:ctx-56a662aa job-1371174 ctx-3afdce4f) Deleting site-to-site VPN= customer gateways for account 490 > 2017-11... -- This message was sent by Atlassian JIRA (v6.4.14#64029)