You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Rajesh Battala <ra...@citrix.com> on 2013/06/27 11:11:02 UTC

Re: Review Request 12025: CLOUDSTACK-2304 [ZWPS]NPE while migrating volume from one zone wide primary to another


> On June 21, 2013, 9:18 p.m., edison su wrote:
> > engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java, line 537
> > <https://reviews.apache.org/r/12025/diff/1/?file=310007#file310007line537>
> >
> >     Again, if pool.getPodId() == null, then newVol.setPodId(pool.getPodId()) will work.

Fix provided when NPE is in VolumeVO after object store merge, NPE is generating from different path.

have to do re-work and will submit the patch


2013-06-27 14:24:51,007 DEBUG [agent.transport.Request] (Job-Executor-33:job-57) Seq 3-393160908: Received:  { Ans: , MgmtId: 235715300172635, via: 3, Ver: v1, Flags: 110, { UnsupportedAnswer } }
2013-06-27 14:24:51,008 WARN  [agent.manager.AgentManagerImpl] (Job-Executor-33:job-57) Unsupported Command: Unsupported command issued:org.apache.cloudstack.storage.command.CopyCommand.  Are you sure you got the right type of server?
2013-06-27 14:24:51,009 DEBUG [storage.motion.AncientDataMotionStrategy] (Job-Executor-33:job-57) copy to image store failed: Unsupported command issued:org.apache.cloudstack.storage.command.CopyCommand.  Are you sure you got the right type of server?
2013-06-27 14:24:51,032 DEBUG [storage.motion.AncientDataMotionStrategy] (Job-Executor-33:job-57) copy failed
java.lang.NullPointerException
        at org.apache.cloudstack.storage.volume.VolumeObject.getPath(VolumeObject.java:324)
        at org.apache.cloudstack.storage.to.VolumeObjectTO.<init>(VolumeObjectTO.java:51)
        at org.apache.cloudstack.storage.volume.VolumeObject.getTO(VolumeObject.java:446)
        at org.apache.cloudstack.storage.image.BaseImageStoreDriverImpl.deleteAsync(BaseImageStoreDriverImpl.java:188)
        at org.apache.cloudstack.storage.image.store.ImageStoreImpl.delete(ImageStoreImpl.java:148)
        at org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.copyVolumeBetweenPools(AncientDataMotionStrategy.java:281)
        at org.apache.cloudstack.storage.motion.AncientDataMotionStrategy.copyAsync(AncientDataMotionStrategy.java:330)
        at org.apache.cloudstack.storage.motion.DataMotionServiceImpl.copyAsync(DataMotionServiceImpl.java:57)
        at org.apache.cloudstack.storage.volume.VolumeServiceImpl.copyVolume(VolumeServiceImpl.java:703)
        at com.cloud.storage.VolumeManagerImpl.migrateVolume(VolumeManagerImpl.java:2109)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.storage.VolumeManagerImpl.migrateVolume(VolumeManagerImpl.java:2101)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at org.apache.cloudstack.api.command.user.volume.MigrateVolumeCmd.execute(MigrateVolumeCmd.java:102)
        at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155)
        at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:722)


- Rajesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12025/#review22276
-----------------------------------------------------------


On June 21, 2013, 12:32 p.m., Rajesh Battala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12025/
> -----------------------------------------------------------
> 
> (Updated June 21, 2013, 12:32 p.m.)
> 
> 
> Review request for cloudstack, Alex Huang, edison su, Ram Ganesh, and Sateesh Chodapuneedi.
> 
> 
> Bugs: CLOUDSTACK-2304
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> Issue : while migrating the volume from one ZWPS to another ZWPS then NPE is having which is failing the migration of volume
> Fixed: The issue is, if the volume is in ZWPS then the volume object won't be having podid. 
>        while volume migration, ZWPS specific volume cases are not handled.
>         Fixed the issues by adding a new constructor in VolumeVO and taken care in VolumeServiceImpl to handle ZWPS volume while migration.
> 
> 
> Diffs
> -----
> 
>   engine/schema/src/com/cloud/storage/VolumeVO.java 02c09a2 
>   engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java 1d36f93 
> 
> Diff: https://reviews.apache.org/r/12025/diff/
> 
> 
> Testing
> -------
> 
> Setup:
> Create a KVM cluster and add zwps to the primary storage. ZWPS got mounted on KVM. Created instances in KVM.
> 1. Create a Volume and attach the volume to the running VM. volume got successfully attached to the VM. 
> 2. Detach the Volume and then try to Migrate the Volume to another ZWPS added to the ZONE. volume got migrated successfully to another ZWPS.
>    Observed Volume got copied to the new ZWPS and then the old volume is deleted.
>    Verified db, the volume uuid got updated and necessary fields.
> 
> Addition Testing:
> ================ 
> Created Xenserver cluster add cluster scope storage.
> 1. create a volume and attach the instance running in Xenserver. Success.
> 2. detach the volume and try to migrate the volume to another cluster scope storage. Volume got successfully migrate to another storage. 
>    Observed Volume got copied to the new PS and then the old volume is deleted.
>    Verified db, the volume uuid got updated and necessary fields.
> 
> 
> Thanks,
> 
> Rajesh Battala
> 
>