Updated Branches: refs/heads/4.1 39491fe75 -> 48fc5c886
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/48fc5c88 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/48fc5c88 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/48fc5c88 Branch: refs/heads/4.1 Commit: 48fc5c886e6eed6cdc9fb0185b811ec287e210ce Parents: 39491fe Author: Wido den Hollander <[email protected]> Authored: Wed May 15 13:57:58 2013 +0200 Committer: Chip Childers <[email protected]> Committed: Wed May 15 14:54:51 2013 +0100 ---------------------------------------------------------------------- .../kvm/storage/LibvirtStorageAdaptor.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48fc5c88/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 09db7d8..9f85132 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 @@ -505,7 +505,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) {
