From 40c3a0afa2c721f36f5aeb05631ca0a7bbd81e31 Mon Sep 17 00:00:00 2001 From: abhishek Date: Tue, 23 Nov 2010 14:24:29 -0800 Subject: [PATCH] bug 7249: during volume creation (root and data) for a vm, there was no state being set (we need to set it to ready). Hence, whilst re-attaching a detached vol, we hit a NPE. Fixed the root cause of the state not being set during vm creation, and consequently, fixed this npe status 7249: resolved fixed --- server/src/com/cloud/storage/StorageManagerImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 3260dba61bc..4dc3eb35594 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -823,6 +823,7 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag volume.setPoolType(pool.getPoolType()); volume.setPoolId(pool.getId()); volume.setPodId(pod.getId()); + volume.setState(Volume.State.Ready); _volsDao.persist(volume); } txn.commit();