From 642d0dfe8a53a5df5a0730f7f614b78ec2b06296 Mon Sep 17 00:00:00 2001 From: Anthony Xu Date: Fri, 13 Aug 2010 15:17:33 -0700 Subject: [PATCH] Issue #: 5917 if we found the SR, we'll never create it again. --- .../xen/resource/CitrixResourceBase.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 39976e6c197..f8d4cb67f8a 100644 --- a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -5796,15 +5796,17 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR if (checkSR(sr)) { return sr; } + throw new CloudRuntimeException("Check this SR failed"); + } else { + + if (pool.getPoolType() == StoragePoolType.NetworkFilesystem) + return getNfsSR(pool); + else if (pool.getPoolType() == StoragePoolType.IscsiLUN) + return getIscsiSR(conn, pool); + else + throw new CloudRuntimeException("The pool type: " + pool.getPoolType().name() + " is not supported."); } - if (pool.getPoolType() == StoragePoolType.NetworkFilesystem) - return getNfsSR(pool); - else if (pool.getPoolType() == StoragePoolType.IscsiLUN) - return getIscsiSR(conn, pool); - else - throw new CloudRuntimeException("The pool type: " + pool.getPoolType().name() + " is not supported."); - } protected Answer execute(final CheckConsoleProxyLoadCommand cmd) {