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 2013/05/15 13:59:23 UTC
[2/2] git commit: updated refs/heads/rbd-snap-clone to 9660fe1
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 <wi...@widodh.nl>
Authored: Wed May 15 13:57:58 2013 +0200
Committer: Wido den Hollander <wi...@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) {