mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2515: Verify if the targetPath isn't null before comparing
This commit is contained in:
parent
9b6513466f
commit
68a428f84d
|
|
@ -465,7 +465,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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue