You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Vibranze Teh <vi...@gmail.com> on 2014/09/03 04:11:10 UTC

Questions regarding the template error message

Dear Lists,



I have a customer asking about an error message thrown in CS management
server and he would like to know answer to the following questions.



a) What places the source code processing to output the error message
exists?
b) And what are the conditions for outputting the error message?

Example of the Log Output:


*2014-08-06 15:36:18,434 WARN
[rest.impl.CloudStackRestApiResponseErrorHandler] (catalina-exec-7:null) CS
errorcode=530 2014-08-06 15:36:18,434 WARN
[rest.impl.CloudStackRestApiResponseErrorHandler] (catalina-exec-7:null) CS
errortext=Template stg-celloy2-vape01-20140731 has not been completely
downloaded to zone 7*



I found the following snippet related to the error above.






















*protected DiskProfile createDiskCharacteristics(VolumeVO volume,
VMTemplateVO template, DataCenterVO dc, DiskOfferingVO diskOffering) { if
(volume.getVolumeType() == Type.ROOT && Storage.ImageFormat.ISO !=
template.getFormat()) { SearchCriteria<VMTemplateHostVO> sc =
HostTemplateStatesSearch.create(); sc.setParameters("id",
template.getId()); sc.setParameters("state",
com.cloud.storage.VMTemplateStorageResourceAssoc.Status.DOWNLOADED);
sc.setJoinParameters("host", "dcId", dc.getId()); List<VMTemplateHostVO>
sss = _vmTemplateHostDao.search(sc, null); if (sss.size() == 0) { throw new
CloudRuntimeException("Template " + template.getName() + " has not been
completely downloaded to zone " + dc.getId()); } VMTemplateHostVO ss =
sss.get(0); return new DiskProfile(volume.getId(), volume.getVolumeType(),
volume.getName(), diskOffering.getId(), ss.getSize(),
diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(),
diskOffering.isRecreatable(), Storage.ImageFormat.ISO !=
template.getFormat() ? template.getId() : null); } else { return new
DiskProfile(volume.getId(), volume.getVolumeType(), volume.getName(),
diskOffering.getId(), diskOffering.getDiskSize(),
diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(),
diskOffering.isRecreatable(), null); } }*



and have the following questions:



1.     May I know what is ‘sss’ as in ‘*if (sss.size() == 0)*’? My guess is
it’s something related to secondary storage status and because of the
status is not equal to 0 then it will throw the message of ‘Template X has
not been completely downloaded to zone Y’, mean that it’s still copying and
not 100% completed.

2.     And the condition of outputting the error message IMO is when they
are trying to create an instance using that particular template.

Kindly comment if I am wrong.

Thanks.

5.

Re: Questions regarding the template error message

Posted by Vibranze Teh <vi...@gmail.com>.
Thanks Ilya, but I still couldn't figure out what's the answer to my
questions.
Kindly enlighten.

Cheers.


On Wed, Sep 3, 2014 at 10:37 AM, ilya musayev <il...@gmail.com>
wrote:

> https://git-wip-us.apache.org/repos/asf?p=cloudstack.git&a=
> search&h=HEAD&st=grep&s=has+not+been+completely+downloaded+to
>
>
> On 9/2/14, 7:11 PM, Vibranze Teh wrote:
>
>> Dear Lists,
>>
>>
>>
>> I have a customer asking about an error message thrown in CS management
>> server and he would like to know answer to the following questions.
>>
>>
>>
>> a) What places the source code processing to output the error message
>> exists?
>> b) And what are the conditions for outputting the error message?
>>
>> Example of the Log Output:
>>
>>
>> *2014-08-06 15:36:18,434 WARN
>>
>> [rest.impl.CloudStackRestApiResponseErrorHandler] (catalina-exec-7:null)
>> CS
>> errorcode=530 2014-08-06 15:36:18,434 WARN
>> [rest.impl.CloudStackRestApiResponseErrorHandler] (catalina-exec-7:null)
>> CS
>> errortext=Template stg-celloy2-vape01-20140731 has not been completely
>> downloaded to zone 7*
>>
>>
>>
>>
>> I found the following snippet related to the error above.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *protected DiskProfile createDiskCharacteristics(VolumeVO volume,
>>
>> VMTemplateVO template, DataCenterVO dc, DiskOfferingVO diskOffering) { if
>> (volume.getVolumeType() == Type.ROOT && Storage.ImageFormat.ISO !=
>> template.getFormat()) { SearchCriteria<VMTemplateHostVO> sc =
>> HostTemplateStatesSearch.create(); sc.setParameters("id",
>> template.getId()); sc.setParameters("state",
>> com.cloud.storage.VMTemplateStorageResourceAssoc.Status.DOWNLOADED);
>> sc.setJoinParameters("host", "dcId", dc.getId()); List<VMTemplateHostVO>
>> sss = _vmTemplateHostDao.search(sc, null); if (sss.size() == 0) { throw
>> new
>> CloudRuntimeException("Template " + template.getName() + " has not been
>> completely downloaded to zone " + dc.getId()); } VMTemplateHostVO ss =
>> sss.get(0); return new DiskProfile(volume.getId(), volume.getVolumeType(),
>> volume.getName(), diskOffering.getId(), ss.getSize(),
>> diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(),
>> diskOffering.isRecreatable(), Storage.ImageFormat.ISO !=
>> template.getFormat() ? template.getId() : null); } else { return new
>> DiskProfile(volume.getId(), volume.getVolumeType(), volume.getName(),
>> diskOffering.getId(), diskOffering.getDiskSize(),
>> diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(),
>> diskOffering.isRecreatable(), null); } }*
>>
>>
>>
>>
>> and have the following questions:
>>
>>
>>
>> 1.     May I know what is ‘sss’ as in ‘*if (sss.size() == 0)*’? My guess
>> is
>>
>> it’s something related to secondary storage status and because of the
>> status is not equal to 0 then it will throw the message of ‘Template X has
>> not been completely downloaded to zone Y’, mean that it’s still copying
>> and
>> not 100% completed.
>>
>> 2.     And the condition of outputting the error message IMO is when they
>> are trying to create an instance using that particular template.
>>
>> Kindly comment if I am wrong.
>>
>> Thanks.
>>
>> 5.
>>
>>
>

Re: Questions regarding the template error message

Posted by ilya musayev <il...@gmail.com>.
https://git-wip-us.apache.org/repos/asf?p=cloudstack.git&a=search&h=HEAD&st=grep&s=has+not+been+completely+downloaded+to

On 9/2/14, 7:11 PM, Vibranze Teh wrote:
> Dear Lists,
>
>
>
> I have a customer asking about an error message thrown in CS management
> server and he would like to know answer to the following questions.
>
>
>
> a) What places the source code processing to output the error message
> exists?
> b) And what are the conditions for outputting the error message?
>
> Example of the Log Output:
>
>
> *2014-08-06 15:36:18,434 WARN
> [rest.impl.CloudStackRestApiResponseErrorHandler] (catalina-exec-7:null) CS
> errorcode=530 2014-08-06 15:36:18,434 WARN
> [rest.impl.CloudStackRestApiResponseErrorHandler] (catalina-exec-7:null) CS
> errortext=Template stg-celloy2-vape01-20140731 has not been completely
> downloaded to zone 7*
>
>
>
> I found the following snippet related to the error above.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *protected DiskProfile createDiskCharacteristics(VolumeVO volume,
> VMTemplateVO template, DataCenterVO dc, DiskOfferingVO diskOffering) { if
> (volume.getVolumeType() == Type.ROOT && Storage.ImageFormat.ISO !=
> template.getFormat()) { SearchCriteria<VMTemplateHostVO> sc =
> HostTemplateStatesSearch.create(); sc.setParameters("id",
> template.getId()); sc.setParameters("state",
> com.cloud.storage.VMTemplateStorageResourceAssoc.Status.DOWNLOADED);
> sc.setJoinParameters("host", "dcId", dc.getId()); List<VMTemplateHostVO>
> sss = _vmTemplateHostDao.search(sc, null); if (sss.size() == 0) { throw new
> CloudRuntimeException("Template " + template.getName() + " has not been
> completely downloaded to zone " + dc.getId()); } VMTemplateHostVO ss =
> sss.get(0); return new DiskProfile(volume.getId(), volume.getVolumeType(),
> volume.getName(), diskOffering.getId(), ss.getSize(),
> diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(),
> diskOffering.isRecreatable(), Storage.ImageFormat.ISO !=
> template.getFormat() ? template.getId() : null); } else { return new
> DiskProfile(volume.getId(), volume.getVolumeType(), volume.getName(),
> diskOffering.getId(), diskOffering.getDiskSize(),
> diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(),
> diskOffering.isRecreatable(), null); } }*
>
>
>
> and have the following questions:
>
>
>
> 1.     May I know what is ‘sss’ as in ‘*if (sss.size() == 0)*’? My guess is
> it’s something related to secondary storage status and because of the
> status is not equal to 0 then it will throw the message of ‘Template X has
> not been completely downloaded to zone Y’, mean that it’s still copying and
> not 100% completed.
>
> 2.     And the condition of outputting the error message IMO is when they
> are trying to create an instance using that particular template.
>
> Kindly comment if I am wrong.
>
> Thanks.
>
> 5.
>