cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francois Gaudreault (JIRA)" <>
Subject [jira] [Created] (CLOUDSTACK-7406) Templates using Swift provider reports physical size, and not the virtual size in the template list
Date Fri, 22 Aug 2014 17:46:12 GMT
Francois Gaudreault created CLOUDSTACK-7406:

             Summary: Templates using Swift provider reports physical size, and not the virtual
size in the template list
                 Key: CLOUDSTACK-7406
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
    Affects Versions: 4.4.1
            Reporter: Francois Gaudreault
            Priority: Critical

Looks like the post-download tasks for normal NFS vs. S3/Swift are not the same. Might have
some good reasons (if any?), but a side effect of this is the virtualSize is not properly
reported to CloudStack, which leads to other problems (e.g SolidFire storage plugin creating
LUNs with the wrong size)

Code snippet of 

            if (!(td instanceof S3TemplateDownloader)) {
                // we currently only create for NFS by
                // running some post download script
                td.setDownloadError("Download success, starting install ");
                String result = postDownload(jobId);
                if (result != null) {
                    s_logger.error("Failed post download script: " + result);
                    td.setDownloadError("Failed post download script: " + result);
                } else {
                    td.setDownloadError("Install completed successfully at " + new SimpleDateFormat().format(new
            } else {
                // for s3 and swift, we skip post download step and just set
                // status to trigger callback.
                // set template size for S3
                S3TemplateDownloader std = (S3TemplateDownloader)td;
                long size = std.totalBytes;
                DownloadJob dnld = jobs.get(jobId);
                dnld.setTmpltPath(std.getDownloadLocalPath()); // update template path to
include file name.

So as you can see, the code simply used the downloaded bytes, not the actual virtual drive
size within the vhd.

If we could do a PostDownload sub with the proper steps (e.g get file extension, and grab
the virtualSize) I think it would be sufficient.

This message was sent by Atlassian JIRA

View raw message