You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2014/08/20 14:02:22 UTC

[1/2] git commit: updated refs/heads/master to ab7c1f3

Repository: cloudstack
Updated Branches:
  refs/heads/master 14f3ad55e -> ab7c1f34d


kvm: Throw a proper exception when pool could not be fetched from libvirt

Otherwise NULL is returned and leads to a NPE further up the chain.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1ed0fe4e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1ed0fe4e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1ed0fe4e

Branch: refs/heads/master
Commit: 1ed0fe4ee710d33bdb5c14704bc40de01f49d540
Parents: 14f3ad5
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Wed Aug 20 13:39:52 2014 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Wed Aug 20 13:39:52 2014 +0200

----------------------------------------------------------------------
 .../com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1ed0fe4e/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
index 1d28804..f44bb03 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
@@ -204,6 +204,8 @@ public class KVMStoragePoolManager {
             StoragePoolInformation info = _storagePools.get(uuid);
             if (info != null) {
                 pool = createStoragePool(info.name, info.host, info.port, info.path, info.userInfo, info.poolType, info.type);
+            } else {
+                throw new CloudRuntimeException("Could not fetch storage pool " + uuid + " from libvirt");
             }
         }
         return pool;


[2/2] git commit: updated refs/heads/master to ab7c1f3

Posted by wi...@apache.org.
kvm: Do not print the whole exception when pool is not found in libvirt

This causes the logs to be filled with Exceptions which aren't nice for
users to read


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ab7c1f34
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ab7c1f34
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ab7c1f34

Branch: refs/heads/master
Commit: ab7c1f34d6212c68b7da89392b826e90eaf269ad
Parents: 1ed0fe4
Author: Wido den Hollander <wi...@widodh.nl>
Authored: Wed Aug 20 14:00:29 2014 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Wed Aug 20 14:00:29 2014 +0200

----------------------------------------------------------------------
 .../com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ab7c1f34/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
index e9c588e..90608c2 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
@@ -390,7 +390,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
 
             return pool;
         } catch (LibvirtException e) {
-            s_logger.debug("can't get storage pool", e);
+            s_logger.debug("Could not find storage pool " + uuid + " in libvirt");
             throw new CloudRuntimeException(e.toString(), e);
         }
     }