cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [2/2] git commit: updated refs/heads/rbd-snap-clone to 9660fe1
Date Wed, 15 May 2013 11:59:23 GMT
CLOUDSTACK-2515: Verify if the targetPath isn't null before comparing


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

Branch: refs/heads/rbd-snap-clone
Commit: 9660fe17b61d5becdaa94986a43f97df043e847f
Parents: 76eca22
Author: Wido den Hollander <wido@widodh.nl>
Authored: Wed May 15 13:57:58 2013 +0200
Committer: Wido den Hollander <wido@widodh.nl>
Committed: Wed May 15 13:58:36 2013 +0200

----------------------------------------------------------------------
 .../kvm/storage/LibvirtStorageAdaptor.java         |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9660fe17/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 b18e6a4..0b00d07 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
@@ -476,7 +476,8 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
                     StoragePool p = conn.storagePoolLookupByName(poolname);
                     LibvirtStoragePoolDef pdef = getStoragePoolDef(conn, p);
 
-                    if (pdef.getTargetPath().equals(path)) {
+                    String targetPath = pdef.getTargetPath();
+                    if (targetPath != null && targetPath.equals(path)) {
                         s_logger.debug("Storage pool utilizing path '" + path + "' already
exists as pool "
                                        + poolname + ", undefining so we can re-define with
correct name " + name);
                         if (p.isPersistent() == 1) {


Mime
View raw message