[ https://issues.apache.org/jira/browse/CLOUDSTACK-9423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357530#comment-15357530 ]
ASF GitHub Bot commented on CLOUDSTACK-9423: -------------------------------------------- GitHub user syed reopened a pull request: https://github.com/apache/cloudstack/pull/1598 [CLOUDSTACK-9423] Add ability to get virtual size of compressed VHDs With object store like Swift as secondary storage, if a compressed VHD is uploaded as a template, the `VHDProcessor` incorrectly calculates the virutal size leading to the template being useless. This fix tries to guess the virtual size by partially decompressing it and falls back to a sensible default which is the size of the file. Before the fix: template.properties on Swift ``` uniquename=routing-1 filename=routing-1.vhd size=263417314 virtualsize=2894447637315205059 ``` After the fix ``` uniquename=routing-1 filename=routing-1.vhd size=263417314 virtualsize=3145728000 ``` Look at the `virutalsize` in both cases You can merge this pull request into a Git repository by running: $ git pull https://github.com/syed/cloudstack vhd-compressed-size Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1598.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1598 ---- commit b0247b53f99ff97fd05d4d8528115ed6e7d497c0 Author: Syed <syed1.mush...@gmail.com> Date: 2016-06-27T20:11:14Z [CLOUDSTACK-9423] Add ability to get virtual size of compressed VHDs ---- > Object storage should get the correct size for compressed templates > ------------------------------------------------------------------- > > Key: CLOUDSTACK-9423 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9423 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: syed ahmed > Labels: secondary_storage, swift, template > > When uploading templates to an object store like Swift, if the template is > compressed, we get an invalid size (negative). This fix tries to see if the > template is compressed, if so, gets the correct size by partially > decompressing the VHD header. -- This message was sent by Atlassian JIRA (v6.3.4#6332)