Stream raw images

Bug #1505685 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ironic-python-agent
Fix Released
Wishlist
Lucas Alvares Gomes

Bug Description

IPA always cache the image under /tmp and then copy it to the disk. While this is required for images using some disk format such as qcow2 that requires it to be converted before it's copied to the disk (due the need of random access in the image file), the same doesn't hold true for raw disk images.

For raw disks images the image could be downloaded and copied onto de disk directly without the need of caching it before, this would be faster and would require less memory to run the ramdisk.

Also, checksum can be computed from the stream and verified at the end of the process.

Changed in ironic-python-agent:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Wishlist
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to ironic-python-agent (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/234338

Changed in ironic-python-agent:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-python-agent (master)

Fix proposed to branch: master
Review: https://review.openstack.org/234339

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to ironic-python-agent (master)

Reviewed: https://review.openstack.org/234338
Committed: https://git.openstack.org/cgit/openstack/ironic-python-agent/commit/?id=65053b7737ffe9641974df926d694efd801ba417
Submitter: Jenkins
Branch: master

commit 65053b7737ffe9641974df926d694efd801ba417
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Oct 13 17:10:37 2015 +0100

    Refactor the image download and checksum computation bits

    Prior to this patch downloading and computing the checksum of the image
    were done in different stages, after the download the file would need
    to be re-read and the checksum was computed. This patch is changing it
    by creating a ImageDownload class which computes the checksum at the same
    time the image is being downloaded, this saves time and also make the
    code more portable.

    Related-Bug: #1505685
    Change-Id: I71f9f2bd9a62a6a6cc474d0ae519591cea6381d6

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-python-agent (master)

Reviewed: https://review.openstack.org/234339
Committed: https://git.openstack.org/cgit/openstack/ironic-python-agent/commit/?id=e320bb8942f6737969ed58e732de26bdcb528a84
Submitter: Jenkins
Branch: master

commit e320bb8942f6737969ed58e732de26bdcb528a84
Author: Lucas Alvares Gomes <email address hidden>
Date: Tue Oct 13 17:31:46 2015 +0100

    Add support for streaming raw images directly onto the disk

    This patch adds support for streaming a raw image directly onto the disk,
    that means no more time spent writing the image to a tmpfs partition prior
    to copying it to the disk. Checksum computation is also done as the image
    is being streamed. Streaming raw images is disabled by default, however
    this behavior can be enabled by passing a key called "stream_raw_images"
    with the value of True to the prepare_image() command of IPA.

    For non-raw images this may not be possible, not sure about all image
    file formats, but common types such as qcow2 requires random access to
    the image file in order to be converted to raw.

    Closes-Bug: #1505685
    Change-Id: Iddf67907bc9b54bbd3065a97064cb5a3602cfe18

Changed in ironic-python-agent:
status: In Progress → Fix Committed
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/ironic-python-agent 1.1.0

This issue was fixed in the openstack/ironic-python-agent 1.1.0 release.

Dmitry Tantsur (divius)
Changed in ironic-python-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.