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 DF3D4200C85 for ; Tue, 30 May 2017 13:01:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DE05B160BDC; Tue, 30 May 2017 11:01:08 +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 DFD20160BC1 for ; Tue, 30 May 2017 13:01:07 +0200 (CEST) Received: (qmail 26175 invoked by uid 500); 30 May 2017 11:01:06 -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 26166 invoked by uid 500); 30 May 2017 11:01:06 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 26163 invoked by uid 99); 30 May 2017 11:01:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2017 11:01:06 +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 51EEBC1FD2 for ; Tue, 30 May 2017 11:01:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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 (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id QVBw2EGuoytr for ; Tue, 30 May 2017 11:01:05 +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 11B255FBE2 for ; Tue, 30 May 2017 11:01:05 +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 71CC7E0C0F for ; Tue, 30 May 2017 11:01:04 +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 1CE5921B58 for ; Tue, 30 May 2017 11:01:04 +0000 (UTC) Date: Tue, 30 May 2017 11:01:04 +0000 (UTC) From: "Suresh Kumar Anaparti (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CLOUDSTACK-9932) Snapshot is getting deleted while volume creation from the snapshot is in progress MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 30 May 2017 11:01:09 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Suresh Kumar Anaparti reassigned CLOUDSTACK-9932: ------------------------------------------------- Assignee: Pavan Kumar Aravapalli > Snapshot is getting deleted while volume creation from the snapshot is in progress > ----------------------------------------------------------------------------------- > > Key: CLOUDSTACK-9932 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9932 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Affects Versions: 4.10.0.0 > Environment: ACS -4.10. > http://10.112.3.52:8080/client/ > user : admin > password : password > Reporter: veerapuppala > Assignee: Pavan Kumar Aravapalli > > Issue: > ------- > Snapshot is getting deleted while the volume create request from the snapshot is in progress. > Steps to reproduce : > ------------------------- > 1) Create root/data volume snapshot > 2) Create Volumes from the snapshot > 3) Delete the snapshot immediately while the volume creation is in progress > Existing behavior: > --------------------- > Snapshot is getting deleted from the ACS and status is "Destroyed" in the snapshots table. > Error message: > --------------------- > 2017-05-30 04:10:17,120 DEBUG [c.c.a.t.Request] (API-Job-Executor-26:ctx-8ba0012a job-188 ctx-ffe9988e) (logid:fd7a5d83) Seq 1-1570067420092044880: Received: { Ans: , MgmtId: 196796298644167, via: 1(localhost), Ver: v1, Flags: 110, { CopyCmdAnswer } } > 2017-05-30 04:10:17,131 WARN [o.a.c.s.d.ObjectInDataStoreManagerImpl] (API-Job-Executor-26:ctx-8ba0012a job-188 ctx-ffe9988e) (logid:fd7a5d83) Unsupported data object (VOLUME, org.apache.cloudstack.storage.datastore.PrimaryDataStoreImpl@5c07d712), no need to delete from object in store ref table > 2017-05-30 04:10:17,139 DEBUG [o.a.c.e.o.VolumeOrchestrator] (API-Job-Executor-26:ctx-8ba0012a job-188 ctx-ffe9988e) (logid:fd7a5d83) Failed to create volume from snapshot:null due to Task failed! Task record: uuid: bf2abdea-bea3-36e2-22f0-8fa62985c614 > nameLabel: Async.VDI.copy > nameDescription: > allowedOperations: [] > currentOperations: {} > created: Tue May 30 04:10:10 EDT 2017 > finished: Tue May 30 04:10:16 EDT 2017 > status: failure > residentOn: com.xensource.xenapi.Host@7a705050 > progress: 1.0 > type: > result: > errorInfo: [INTERNAL_ERROR, End_of_file] > otherConfig: {} > subtaskOf: com.xensource.xenapi.Task@aaf13f6f > subtasks: [] > > 2017-05-30 04:10:17,166 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-26:ctx-8ba0012a job-188 ctx-ffe9988e) (logid:fd7a5d83) Access granted to Acct[def73ff3-3fbb-11e7-b95a-b2fc35794ac7-admin] to Domain:1/ by AffinityGroupAccessChecker > 2017-05-30 04:10:17,180 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-26:ctx-8ba0012a job-188) (logid:fd7a5d83) Unexpected exception while executing org.apache.cloudstack.api.command.admin.volume.CreateVolumeCmdByAdmin > com.cloud.utils.exception.CloudRuntimeException: Failed to create volume: 42 > at com.cloud.storage.VolumeApiServiceImpl.createVolume(VolumeApiServiceImpl.java:803) > at com.cloud.storage.VolumeApiServiceImpl.createVolume(VolumeApiServiceImpl.java:175) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333) > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) > at org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168) > at com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168) > at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92) > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213) > at com.sun.proxy.$Proxy207.createVolume(Unknown Source) > at org.apache.cloudstack.api.command.admin.volume.CreateVolumeCmdByAdmin.execute(CreateVolumeCmdByAdmin.java:42) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150) > at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:108) > at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:558) > at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) > at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56) > at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103) > at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53) > at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46) > at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:506) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:748) > Caused by: com.cloud.utils.exception.CloudRuntimeException: Failed to create volume from snapshot:null due to Task failed! Task record: uuid: bf2abdea-bea3-36e2-22f0-8fa62985c614 > nameLabel: Async.VDI.copy > nameDescription: > allowedOperations: [] > currentOperations: {} > created: Tue May 30 04:10:10 EDT 2017 > finished: Tue May 30 04:10:16 EDT 2017 > status: failure > residentOn: com.xensource.xenapi.Host@7a705050 > progress: 1.0 > type: > result: > errorInfo: [INTERNAL_ERROR, End_of_file] > otherConfig: {} > subtaskOf: com.xensource.xenapi.Task@aaf13f6f > subtasks: [] > > at org.apache.cloudstack.engine.orchestration.VolumeOrchestrator.createVolumeFromSnapshot(VolumeOrchestrator.java:439) > at com.cloud.storage.VolumeApiServiceImpl.createVolumeFromSnapshot(VolumeApiServiceImpl.java:825) > at com.cloud.storage.VolumeApiServiceImpl.createVolume(VolumeApiServiceImpl.java:775) > ... 31 more > 2017-05-30 04:10:17,181 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-26:ctx-8ba0012a job-188) (logid:fd7a5d83) Complete async job-188, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":530,"errortext":"Failed to create volume: 42"} > 2017-05-30 04:10:17,194 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-26:ctx-8ba0012a job-188) (logid:fd7a5d83) Publish async job-188 complete on message bus > 2017-05-30 04:10:17,194 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-26:ctx-8ba0012a job-188) (logid:fd7a5d83) Wake up jobs related to job-188 > > Expected Behavior: > ------------------------- > It should not be getting deleted while the volume request is in progress. or It should give warning message or Alert message as volume create request is in progress on the snapshot. > Below are the details from snapshot and snapshot_store_ref tables. > ------------------------------------------------------------------------------------------ > mysql> select * from snapshots where id=9\G; > > id: 9 > data_center_id: 1 > account_id: 2 > domain_id: 1 > volume_id: 37 > disk_offering_id: 2 > status: Destroyed > path: NULL > name: m29snap2 > uuid: f08ff2b5-b889-41c2-bc15-ccc7b94342b8 > snapshot_type: 0 > type_description: MANUAL > size: 21474836480 > created: 2017-05-29 10:33:13 > removed: NULL > backup_snap_id: NULL > swift_id: NULL > sechost_id: NULL > prev_snap_id: NULL > hypervisor_type: XenServer > version: 2.2 > s3_id: NULL > min_iops: NULL > max_iops: NULL > location_type: NULL > 1 row in set (0.00 sec) > > mysql> select * from snapshot_store_ref where snapshot_id=9\G; > > id: 17 > store_id: 1 > snapshot_id: 9 > created: 2017-05-29 10:33:13 > last_updated: NULL > job_id: NULL > store_role: Primary > size: 21474836480 > physical_size: 21474836480 > parent_snapshot_id: 0 > install_path: bf345178-07f7-46c8-ab50-e5ecce67c1ba > state: Destroyed > update_count: 2 > ref_cnt: 0 > updated: 2017-05-29 10:33:17 > volume_id: 37 > ============================================== > > id: 18 > store_id: 1 > snapshot_id: 9 > created: 2017-05-29 10:33:17 > last_updated: NULL > job_id: NULL > store_role: Image > size: 21474836480 > physical_size: 45056 > parent_snapshot_id: 0 > install_path: snapshots/2/37/8e0f004e-f916-4f4f-895d-8d95eab00463.vhd > state: Destroyed > update_count: 4 > ref_cnt: 0 > updated: 2017-05-30 08:10:15 > volume_id: 37 > 2 rows in set (0.00 sec) > > [root@localhost primary]# ls bf345178-07f7-46c8-ab50-e5ecce67c1ba.vhd > bf345178-07f7-46c8-ab50-e5ecce67c1ba.vhd > > [root@localhost secondary]# cd snapshots/ > [root@localhost snapshots]# cd 2/37/ > [root@localhost 37]# ls -- This message was sent by Atlassian JIRA (v6.3.15#6346)