mirror of https://github.com/apache/cloudstack.git
fix delete storage pool
This commit is contained in:
parent
cbb54c549e
commit
14d09f53a4
|
|
@ -60,13 +60,14 @@ public class LibvirtStorageResource {
|
|||
|
||||
public boolean deleteStoragePool(Connect conn, StorageFilerTO spt) throws LibvirtException {
|
||||
StoragePool pool = getStoragePool(conn, spt.getUuid());
|
||||
LibvirtStoragePoolDef spd = getStoragePoolDef(conn, pool);
|
||||
|
||||
synchronized (getStoragePool(pool.getUUIDString())) {
|
||||
pool.destroy();
|
||||
pool.undefine();
|
||||
}
|
||||
|
||||
LibvirtStoragePoolDef spd = getStoragePoolDef(conn, pool);
|
||||
|
||||
|
||||
if (spd.getPoolType() == poolType.NETFS) {
|
||||
KVMHABase.NfsStoragePool sp = new KVMHABase.NfsStoragePool(spt.getUuid(),
|
||||
|
|
@ -270,6 +271,7 @@ public class LibvirtStorageResource {
|
|||
pool.getHost(), pool.getPath(), pool.getPath());
|
||||
StoragePool sp = null;
|
||||
try {
|
||||
s_logger.debug(spd.toString());
|
||||
addStoragePool(pool.getUuid());
|
||||
synchronized (getStoragePool(pool.getUuid())) {
|
||||
sp = conn.storagePoolDefineXML(spd.toString(), 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue