fix storage mount point is not available issue

This commit is contained in:
Edison Su 2012-02-09 14:56:25 -08:00
parent 498d57fa3d
commit 46492ebbf6
1 changed files with 5 additions and 1 deletions

View File

@ -305,7 +305,7 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
} catch (LibvirtException e) {
s_logger.debug("Faild to get vol path: " + e.toString());
throw e;
} finally {
} finally {l
try {
if (sp != null) {
sp.free();
@ -454,6 +454,10 @@ public class LibvirtStorageAdaptor implements StorageAdaptor {
try {
sp = conn.storagePoolLookupByUUIDString(name);
if (sp.getInfo().state != StoragePoolState.VIR_STORAGE_POOL_RUNNING) {
sp.undefine();
sp = null;
}
} catch (LibvirtException e) {
}