mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
add lvmohba support
This commit is contained in:
parent
f9c6fed9a2
commit
b9a5183b34
@ -256,7 +256,7 @@ public abstract class CitrixResourceBase implements ServerResource {
|
||||
protected HashMap<StoragePoolType, StoragePoolResource> _pools = new HashMap<StoragePoolType, StoragePoolResource>(5);
|
||||
|
||||
public enum SRType {
|
||||
NFS, LVM, ISCSI, ISO, LVMOISCSI;
|
||||
NFS, LVM, ISCSI, ISO, LVMOISCSI, LVMOHBA;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -4997,7 +4997,7 @@ public abstract class CitrixResourceBase implements ServerResource {
|
||||
}
|
||||
|
||||
boolean IsISCSI(String type) {
|
||||
return SRType.LVMOISCSI.equals(type) || SRType.LVM.equals(type) ;
|
||||
return SRType.LVMOHBA.equals(type) || SRType.LVMOISCSI.equals(type) || SRType.LVM.equals(type) ;
|
||||
}
|
||||
|
||||
protected ManageSnapshotAnswer execute(final ManageSnapshotCommand cmd) {
|
||||
|
||||
@ -173,12 +173,6 @@ public class XenServer56Resource extends CitrixResourceBase {
|
||||
protected SR getStorageRepository(Connection conn, StorageFilerTO pool) {
|
||||
try {
|
||||
SR sr = super.getStorageRepository(conn, pool);
|
||||
|
||||
if (!sr.getShared(conn) || ( pool.getType() != StoragePoolType.IscsiLUN
|
||||
&& pool.getType() != StoragePoolType.NetworkFilesystem
|
||||
&& pool.getType() != StoragePoolType.PreSetup)) {
|
||||
return sr;
|
||||
}
|
||||
setupHeartbeatSr(conn, sr, false);
|
||||
return sr;
|
||||
} catch (Exception e) {
|
||||
@ -223,12 +217,12 @@ public class XenServer56Resource extends CitrixResourceBase {
|
||||
}
|
||||
|
||||
protected String setupHeartbeatSr(Connection conn, SR sr, boolean force) throws XenAPIException, XmlRpcException {
|
||||
Host host = Host.getByUuid(conn, _host.uuid);
|
||||
SR.Record srRec = sr.getRecord(conn);
|
||||
String srUuid = srRec.uuid;
|
||||
if (!srRec.shared || (!SRType.LVMOISCSI.equals(srRec.type) && !SRType.NFS.equals(srRec.type))) {
|
||||
if (!srRec.shared || (!SRType.LVMOHBA.equals(srRec.type) && !SRType.LVMOISCSI.equals(srRec.type) && !SRType.NFS.equals(srRec.type) )) {
|
||||
return srUuid;
|
||||
}
|
||||
Host host = Host.getByUuid(conn, _host.uuid);
|
||||
Set<String> tags = host.getTags(conn);
|
||||
if (force || !tags.contains("cloud-heartbeat-" + srUuid)) {
|
||||
if (s_logger.isDebugEnabled()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user