cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Zięba <t.a.zi...@gmail.com>
Subject Re: download template -> delete vhd
Date Thu, 24 Jul 2014 09:16:32 GMT
Hello,

https://github.com/apache/cloudstack/blob/master/services/secondary-storage/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.toLowerCase()))){


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/8b6dc7ce2f0058b9cf29bd9c72e4e0db
> >9162fe6e/services/secondary-storage/server/src/org/apache/cloudstack/stora
> >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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message