mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
revert wrong fix of 24bcb4ddf210fbd4ca6032bb5aa6bd02f7480a73 that built-in templates can not be found
The root cause is we didn't return SSVM in connecting status when doing template sync
This commit is contained in:
parent
46dac852fa
commit
09fc1be631
@ -379,7 +379,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
||||
public Answer sendToSecStorage(HostVO ssHost, Command cmd) {
|
||||
if( ssHost.getType() == Host.Type.LocalSecondaryStorage ) {
|
||||
return easySend(ssHost.getId(), cmd);
|
||||
} else if ( ssHost.getType() == Host.Type.SecondaryStorage || ssHost.getType() == Host.Type.SecondaryStorageVM) {
|
||||
} else if ( ssHost.getType() == Host.Type.SecondaryStorage) {
|
||||
return sendToSSVM(ssHost.getDataCenterId(), cmd);
|
||||
} else {
|
||||
String msg = "do not support Secondary Storage type " + ssHost.getType();
|
||||
|
||||
@ -585,7 +585,7 @@ public class DownloadMonitorImpl implements DownloadMonitor {
|
||||
}
|
||||
long sserverId = ssHost.getId();
|
||||
long zoneId = ssHost.getDataCenterId();
|
||||
if (!(ssHost.getType() == Host.Type.SecondaryStorage || ssHost.getType() == Host.Type.LocalSecondaryStorage || ssHost.getType() == Host.Type.SecondaryStorageVM)) {
|
||||
if (!(ssHost.getType() == Host.Type.SecondaryStorage || ssHost.getType() == Host.Type.LocalSecondaryStorage)) {
|
||||
s_logger.warn("Huh? Agent id " + sserverId + " is not secondary storage host");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1275,7 +1275,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
@Override
|
||||
public HostVO findSecondaryStorageHost(long dcId) {
|
||||
SearchCriteriaService<HostVO, HostVO> sc = SearchCriteria2.create(HostVO.class);
|
||||
sc.addAnd(sc.getEntity().getType(), Op.IN, Host.Type.SecondaryStorage, Host.Type.SecondaryStorageVM);
|
||||
sc.addAnd(sc.getEntity().getType(), Op.EQ, Host.Type.SecondaryStorage);
|
||||
sc.addAnd(sc.getEntity().getDataCenterId(), Op.EQ, dcId);
|
||||
List<HostVO> storageHosts = sc.list();
|
||||
if (storageHosts == null || storageHosts.size() < 1) {
|
||||
@ -1289,7 +1289,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
@Override
|
||||
public List<HostVO> listSecondaryStorageHostsInAllZones() {
|
||||
SearchCriteriaService<HostVO, HostVO> sc = SearchCriteria2.create(HostVO.class);
|
||||
sc.addAnd(sc.getEntity().getType(), Op.IN, Host.Type.SecondaryStorage, Host.Type.SecondaryStorageVM);
|
||||
sc.addAnd(sc.getEntity().getType(), Op.EQ, Host.Type.SecondaryStorage);
|
||||
return sc.list();
|
||||
}
|
||||
|
||||
@ -1297,7 +1297,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
public List<HostVO> listSecondaryStorageHostsInOneZone(long dataCenterId) {
|
||||
SearchCriteriaService<HostVO, HostVO> sc = SearchCriteria2.create(HostVO.class);
|
||||
sc.addAnd(sc.getEntity().getDataCenterId(), Op.EQ, dataCenterId);
|
||||
sc.addAnd(sc.getEntity().getType(), Op.IN, Host.Type.SecondaryStorage, Host.Type.SecondaryStorageVM);
|
||||
sc.addAnd(sc.getEntity().getType(), Op.EQ, Host.Type.SecondaryStorage);
|
||||
return sc.list();
|
||||
}
|
||||
|
||||
@ -1313,7 +1313,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
public List<HostVO> listAllTypesSecondaryStorageHostsInOneZone(long dataCenterId) {
|
||||
SearchCriteriaService<HostVO, HostVO> sc = SearchCriteria2.create(HostVO.class);
|
||||
sc.addAnd(sc.getEntity().getDataCenterId(), Op.EQ, dataCenterId);
|
||||
sc.addAnd(sc.getEntity().getType(), Op.IN, Host.Type.LocalSecondaryStorage, Host.Type.SecondaryStorage, Host.Type.SecondaryStorageVM);
|
||||
sc.addAnd(sc.getEntity().getType(), Op.IN, Host.Type.LocalSecondaryStorage, Host.Type.SecondaryStorage);
|
||||
return sc.list();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user