From dadab81721ad75be251ce36073b4573f6c96db2e Mon Sep 17 00:00:00 2001 From: alena Date: Tue, 29 Mar 2011 20:17:49 -0700 Subject: [PATCH] Fixed NPE in listVirtualMachines command - when search for ROOT volume's storagePool type, assume that corresponding storagePool might be removed. --- server/src/com/cloud/api/ApiDBUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java index ac6d848af66..1d99e5ede0b 100755 --- a/server/src/com/cloud/api/ApiDBUtils.java +++ b/server/src/com/cloud/api/ApiDBUtils.java @@ -394,7 +394,7 @@ public class ApiDBUtils { } public static StoragePoolVO findStoragePoolById(Long storagePoolId) { - return _storagePoolDao.findById(storagePoolId); + return _storagePoolDao.findByIdIncludingRemoved(storagePoolId); } public static VMTemplateVO findTemplateById(Long templateId) {