mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 10669: it is due to there is a templatehostref for this template, whose status is not DOWNLOADED
fixed by only check ready templatehostref for ISO download status 10669: resolved fixed
This commit is contained in:
parent
9db9d3f36f
commit
dda3f220d6
@ -271,7 +271,7 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
||||
tmpltHostRef = _tmpltHostDao.findByHostTemplate(secondaryStorageHost.getId(), templateId);
|
||||
if (tmpltHostRef != null){
|
||||
if (tmpltHostRef.getDownloadState() != com.cloud.storage.VMTemplateStorageResourceAssoc.Status.DOWNLOADED) {
|
||||
throw new InvalidParameterValueException("The " + desc + " has not been downloaded ");
|
||||
tmpltHostRef = null;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
@ -280,6 +280,9 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
||||
}
|
||||
}
|
||||
|
||||
if ( tmpltHostRef == null ) {
|
||||
throw new InvalidParameterValueException("The " + desc + " has not been downloaded ");
|
||||
}
|
||||
Upload.Mode extractMode;
|
||||
if( mode == null || (!mode.equals(Upload.Mode.FTP_UPLOAD.toString()) && !mode.equals(Upload.Mode.HTTP_DOWNLOAD.toString())) ){
|
||||
throw new InvalidParameterValueException("Please specify a valid extract Mode "+Upload.Mode.values());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user