mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Summary: Don't add secondary storage to KVM heartbeat
BUG-ID: CLOUDSTACK-2173 Bugfix-for: 4.2 Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1366865750 -0600
This commit is contained in:
parent
299cccf779
commit
33006ff197
@ -55,9 +55,10 @@ public class KVMHAMonitor extends KVMHABase implements Runnable {
|
||||
public void removeStoragePool(String uuid) {
|
||||
synchronized (_storagePool) {
|
||||
NfsStoragePool pool = this._storagePool.get(uuid);
|
||||
Script.runSimpleBashScript("umount " + pool._mountDestPath);
|
||||
s_logger.debug("attempted to umount '" + pool._mountDestPath + "'");
|
||||
this._storagePool.remove(uuid);
|
||||
if (pool != null) {
|
||||
Script.runSimpleBashScript("umount " + pool._mountDestPath);
|
||||
this._storagePool.remove(uuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -94,18 +94,26 @@ public class KVMStoragePoolManager {
|
||||
protocol = StoragePoolType.NetworkFilesystem;
|
||||
}
|
||||
|
||||
return createStoragePool(uuid, sourceHost, 0, sourcePath, "", protocol);
|
||||
// secondary storage registers itself through here
|
||||
return createStoragePool(uuid, sourceHost, 0, sourcePath, "", protocol, false);
|
||||
}
|
||||
|
||||
public KVMStoragePool createStoragePool( String name, String host, int port,
|
||||
String path, String userInfo,
|
||||
StoragePoolType type) {
|
||||
// primary storage registers itself through here
|
||||
return createStoragePool(name, host, port, path, userInfo, type, true);
|
||||
}
|
||||
|
||||
private KVMStoragePool createStoragePool( String name, String host, int port,
|
||||
String path, String userInfo,
|
||||
StoragePoolType type, boolean primaryStorage) {
|
||||
StorageAdaptor adaptor = getStorageAdaptor(type);
|
||||
KVMStoragePool pool = adaptor.createStoragePool(name,
|
||||
host, port, path, userInfo, type);
|
||||
|
||||
// LibvirtStorageAdaptor-specific statement
|
||||
if (type == StoragePoolType.NetworkFilesystem) {
|
||||
if (type == StoragePoolType.NetworkFilesystem && primaryStorage) {
|
||||
KVMHABase.NfsStoragePool nfspool = new KVMHABase.NfsStoragePool(
|
||||
pool.getUuid(), host, path, pool.getLocalPath(),
|
||||
PoolType.PrimaryStorage);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user