cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rohit Yadav <>
Subject Re: Trouble detaching volume
Date Thu, 09 Apr 2015 11:56:26 GMT
Hi Erik,

Looking at the NPE and code, looks like the volumePool returned using the volume’s pool
ID was null. While the surface issue seems to be solvable by simply adding a != null check.
Can you share if the volume (you were trying to detach) has NULL as the pool_id in db or if
the storage pool was removed?

Possible fixes could be following, though I’m not sure if we should be searching from storagePool
table including those which are removed or simply use the !=null check :

-        StoragePoolVO volumePool = _storagePoolDao.findById(volume.getPoolId());
+        StoragePoolVO volumePool = _storagePoolDao.findByIdIncludingRemoved(volume.getPoolId());

        if (hostId != null) {
            host = _hostDao.findById(hostId);

-            if (host != null && host.getHypervisorType() == HypervisorType.XenServer
&& volumePool.isManaged()) {
+            if (host != null && host.getHypervisorType() == HypervisorType.XenServer
&& volumePool != null && volumePool.isManaged()) {
                sendCommand = true;


> On 09-Apr-2015, at 5:00 pm, Erik Weber <> wrote:
> While testing 4.5.1 RC2 I see this when trying to detach a volume:
> Can't say if it's regression or not, but any help solving it is appreciated
> :-)
> --
> Erik

Rohit Yadav
Software Architect, ShapeBlue
M. +91 88 262 30892 |
Blog: | Twitter: @_bhaisaab

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<>
CSForge – rapid IaaS deployment framework<>
CloudStack Consulting<>
CloudStack Software Engineering<>
CloudStack Infrastructure Support<>
CloudStack Bootcamp Training Courses<>

This email and any attachments to it may be confidential and are intended solely for the use
of the individual to whom it is addressed. Any views or opinions expressed are solely those
of the author and do not necessarily represent those of Shape Blue Ltd or related companies.
If you are not the intended recipient of this email, you must neither take any action based
upon its contents, nor copy or show it to anyone. Please contact the sender if you believe
you have received this email in error. Shape Blue Ltd is a company incorporated in England
& Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated
under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated
in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company
registered by The Republic of South Africa and is traded under license from Shape Blue Ltd.
ShapeBlue is a registered trademark.
View raw message