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 E9D3B182B4 for ; Wed, 18 Nov 2015 07:23:30 +0000 (UTC) Received: (qmail 98221 invoked by uid 500); 18 Nov 2015 07:23:30 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 98165 invoked by uid 500); 18 Nov 2015 07:23:30 -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 98154 invoked by uid 99); 18 Nov 2015 07:23:30 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Nov 2015 07:23:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E2080C7024 for ; Wed, 18 Nov 2015 07:23:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.445 X-Spam-Level: ** X-Spam-Status: No, score=2.445 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-0.553, SPF_HELO_PASS=-0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id ReGg77edPmut for ; Wed, 18 Nov 2015 07:23:25 +0000 (UTC) Received: from 189.cn (mta.189.cn [121.14.53.138]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id 929142022D for ; Wed, 18 Nov 2015 07:23:23 +0000 (UTC) HMM_SOURCE_IP: 10.64.8.33:58122.45248842 HMM_ATTACHE_NUM: 0000 HMM_SOURCE_TYPE: SMTP Received: from qianshthink (unknown [10.64.8.33]) by 189.cn (HERMES) with ESMTP id ECC7317C193 for ; Wed, 18 Nov 2015 15:23:00 +0800 (CST) Received: from qianshthink ([36.110.61.109]) by zm-as3(MEDUSA 0.0.0.0) with ESMTP id aa3677d0-9a9b-4617-bac2-80abb628e76c for dev@cloudstack.apache.org; Wed Nov 18 15:23:11 2015 0/X-Total-Score: 0: X-FILTER-SCORE: to=<85869761848d909685949582848c4f8291828489864f909388>, score=<1447831391kmTM19DKyyyyyjyykyymyjmyEVWqf2dddddKddmddydK> X-REAL-FROM: windyii@189.cn X-Receive-IP: 36.110.61.109 From: "Qian Shaohua" To: Subject: [KVM] NPE when createVolume by a snapshot whose source volume is deleted Date: Wed, 18 Nov 2015 15:23:01 +0800 Message-ID: <001901d121d1$f602dfc0$e2089f40$@cn> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001A_01D12215.04261FC0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdEh0fUCI7xoDCMZTZm7865Qm+u/kA== Content-Language: zh-cn ------=_NextPart_000_001A_01D12215.04261FC0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi all, CS 4.5.2 KVM KVMStorageProcessor checks source volume of a snapshot for the ImageFormat in createVolumeFromSnapshot(CopyCommand cmd). If the source volume is deleted, we get NPE. 2015-11-18 14:02:57,259 DEBUG [o.a.c.e.o.VolumeOrchestrator] (API-Job-Executor-35:ctx-0c1e2671 job-2795 ctx-5108a77c) Failed to create volume from snapshot:java.lang.NullPointerException at com.cloud.hypervisor.kvm.storage.KVMStorageProcessor.createVolumeFromSnapsho t(KVMStorageProcessor.java:1237) at com.cloud.storage.resource.StorageSubsystemCommandHandlerBase.execute(Storag eSubsystemCommandHandlerBase.java:97) at com.cloud.storage.resource.StorageSubsystemCommandHandlerBase.handleStorageC ommands(StorageSubsystemCommandHandlerBase.java:53) at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(Li bvirtComputingResource.java:1406) at com.cloud.agent.Agent.processRequest(Agent.java:503) at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:808) at com.cloud.utils.nio.Task.run(Task.java:84) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11 45) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6 15) at java.lang.Thread.run(Thread.java:744) It isn't fix in master as we know. Shall we save format info in snapshots table and get rid of the dependency? Or give the volume info in CopyCommand even if the volume is deleted? -- Qian ------=_NextPart_000_001A_01D12215.04261FC0--