mirror of https://github.com/apache/cloudstack.git
attachISO can be done when SSVM is down
This commit is contained in:
parent
2ef2cc9cf9
commit
9e858992de
|
|
@ -137,5 +137,7 @@ public interface HostDao extends GenericDao<HostVO, Long> {
|
|||
|
||||
void loadDetails(HostVO host);
|
||||
|
||||
void loadHostTags(HostVO host);
|
||||
void loadHostTags(HostVO host);
|
||||
|
||||
List<HostVO> listSecondaryStorageHosts(long dcId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,6 +223,15 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HostVO> listSecondaryStorageHosts(long dcId) {
|
||||
SearchCriteria sc = TypeDcSearch.create();
|
||||
sc.setParameters("type", Host.Type.SecondaryStorage);
|
||||
sc.setParameters("dc", dcId);
|
||||
return listActiveBy(sc);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HostVO> listSecondaryStorageHosts() {
|
||||
SearchCriteria sc = TypeSearch.create();
|
||||
|
|
|
|||
|
|
@ -1054,7 +1054,7 @@ public class StorageManagerImpl implements StorageManager {
|
|||
public String getAbsoluteIsoPath(long templateId, long dataCenterId) {
|
||||
String isoPath = null;
|
||||
|
||||
List<HostVO> storageHosts = _hostDao.listBy(Host.Type.SecondaryStorage, dataCenterId);
|
||||
List<HostVO> storageHosts = _hostDao.listSecondaryStorageHosts(dataCenterId);
|
||||
if (storageHosts != null) {
|
||||
for (HostVO storageHost : storageHosts) {
|
||||
VMTemplateHostVO templateHostVO = _vmTemplateHostDao.findByHostTemplate(storageHost.getId(), templateId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue