mirror of https://github.com/apache/cloudstack.git
fix the race condition for download template
This commit is contained in:
parent
dbb1ed3645
commit
94b3890542
|
|
@ -659,6 +659,10 @@ public class DownloadMonitorImpl implements DownloadMonitor {
|
|||
if (toBeDownloaded.size() > 0) {
|
||||
/*Only download templates whose hypervirsor type is in the zone*/
|
||||
List<HypervisorType> availHypers = _clusterDao.getAvailableHypervisorInZone(ssHost.getDataCenterId());
|
||||
if (availHypers.isEmpty()) {
|
||||
/*This is for cloudzone, local secondary storage resource started before cluster created*/
|
||||
availHypers.add(HypervisorType.KVM);
|
||||
}
|
||||
/* Baremetal need not to download any template */
|
||||
availHypers.remove(HypervisorType.BareMetal);
|
||||
availHypers.add(HypervisorType.None); //bug 9809: resume ISO download.
|
||||
|
|
|
|||
Loading…
Reference in New Issue