From 93172df5569cea02cecf1c4e57646910409ffb6d Mon Sep 17 00:00:00 2001 From: Anshul Gangwar Date: Fri, 4 Oct 2013 15:05:50 +0530 Subject: [PATCH] CLOUDSTACK-3994: fix for Wrong error notification is generated when Primary storage is added with wrong path Signed-off-by: Sateesh Chodapuneedi --- .../lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java index 9a7012494e4..5e0dd958f34 100644 --- a/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java +++ b/plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java @@ -472,6 +472,8 @@ public class CloudStackPrimaryDataStoreLifeCycleImpl implements PrimaryDataStore HypervisorType hType = null; if(hostPoolRecords.size() > 0 ){ hType = getHypervisorType(hostPoolRecords.get(0).getHostId()); + } else { + return false; } // Remove the SR associated with the Xenserver