cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nitin Mehta <Nitin.Me...@citrix.com>
Subject Re: download template -> delete vhd
Date Fri, 25 Jul 2014 00:41:11 GMT
Tomasz -  This fix works but you should rather make the fix on the MS code
which sends the deletion command rather than on the systemvm side.
Moreover if you stop/start ssvm you would loose this jar. You have to
rebuild systemvm.iso and put it back on the host (depends on hypervisor in
use). My suggestion is to change the following hardcoding in the command
below. It should be Upload.Type.VOLUME when you are deleting the volume
link and should be Upload.Type.TEMPLATE when deleting template link.

DeleteEntityDownloadURLCommand cmd = new
DeleteEntityDownloadURLCommand(installPath, Upload.Type.VOLUME,
downloadUrl, ((ImageStoreEntity) store).getMountPoint());


Thanks,
-Nitin

On 24/07/14 2:16 AM, "Tomasz Zięba" <t.a.zieba@gmail.com> wrote:

>Hello,
>
>https://github.com/apache/cloudstack/blob/master/services/secondary-storag
>e/server/src/org/apache/cloudstack/storage/template/UploadManagerImpl.java
>
>We analyzed that the problem is in this line:
>
>        if (cmd.getType() == Upload.Type.VOLUME) {
>
>This line is always true because cmd.getType() return Type.VOLUME also
>when
>function call concern the snapshot.
>
>We made some small modification:
>
>        String VOLUME_ROOT_DIR = "volumes";
>        if((cmd.getType() == Upload.Type.VOLUME) &&
>(cmd.getPath().toString().toLowerCase().contains(VOLUME_ROOT_DIR.toLowerCa
>se()))){
>
>
>and evertything is OK.
>
>Unfortunately this change cause to rebuild systemvm (replace
>cloud-secondary-storage-4.2.1.jar).
>
>If you saying that in version 4.4 this error is corrected it will have to
>happen somewhere in creating the cmd object and the call cmd.getType ()
>return type is different than the VOLUME.
>
>
>
>
>2014-07-23 19:48 GMT+02:00 Min Chen <min.chen@citrix.com>:
>
>> In current ACS master, Template is not deleted from secondary storage
>>when
>> extractTemplate is called, just its symlink is deleted.
>>
>> Thanks
>> -min
>>
>> On 7/23/14 4:15 AM, "Tomasz Zięba" <t.a.zieba@gmail.com> wrote:
>>
>> >Hello,
>> >
>> >Could someone confirm that download template deletes the vhd file from
>> >secondary storage.
>> >
>> >We are testing on the ACS version 4.2.1 but the code responsible for
>> >removing is the same in version 4.4
>> >
>> >
>> 
>>https://github.com/apache/cloudstack/blob/8b6dc7ce2f0058b9cf29bd9c72e4e0d
>>b
>> 
>>>9162fe6e/services/secondary-storage/server/src/org/apache/cloudstack/sto
>>>ra
>> >ge/template/UploadManagerImpl.java
>> >
>> >funkcja: handleDeleteEntityDownloadURLCommand
>> >
>> >
>> >--
>> >Regards,
>> >Tomasz Zięba
>> >Twitter: @TZieba
>> >LinkedIn: pl.linkedin.com/pub/tomasz-zięba-ph-d/3b/7a8/ab6/
>> <http://pl.linkedin.com/pub/tomasz-zi%C4%99ba-ph-d/3b/7a8/ab6/>
>> ><http://pl.linkedin.com/pub/tomasz-zi%C4%99ba-ph-d/3b/7a8/ab6/>
>>
>>
>
>
>-- 
>Regards,
>Tomasz Zięba
>Twitter: @TZieba
>LinkedIn: pl.linkedin.com/pub/tomasz-zięba-ph-d/3b/7a8/ab6/
><http://pl.linkedin.com/pub/tomasz-zi%C4%99ba-ph-d/3b/7a8/ab6/>


Mime
View raw message