deploy_partition_image method may change root_mb value if image does not fit it

Bug #1454263 reported by Vladyslav Drok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Undecided
Vladyslav Drok

Bug Description

There is a check in deploy_partition_image which ensures that size of the image being deployed is greater than or equal to root partition size. It is being checked on driver.deploy step by calling iscsi_deploy.check_image_size by in-tree drivers, but if some out-of-tree driver would use this function without calling iscsi_deploy.check_image_size beforehand the logic would be incorrect, as deploy_partition_image will silently change root_mb value and proceed. It is better to raise an exception in such case.

Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)
status: New → In Progress
Revision history for this message
Ruby Loo (rloo) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/179043
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=c2924949c1e9a659acaf9da7be16d8fa176c0ad2
Submitter: Jenkins
Branch: master

commit c2924949c1e9a659acaf9da7be16d8fa176c0ad2
Author: Vladyslav Drok <email address hidden>
Date: Thu Apr 30 15:30:11 2015 +0300

    Improve root partition size check in deploy_partition_image

    There is a check in deploy_partition_image which ensures that size of
    the image being deployed is greater than or equal to root partition
    size. It is being checked on driver.deploy step by calling
    iscsi_deploy.check_image_size by in-tree drivers, but if some
    out-of-tree driver would use this function without calling
    iscsi_deploy.check_image_size beforehand the logic would be
    incorrect, as deploy_partition_image will silently change root_mb
    value and proceed.

    In this change it is proposed to throw an exception instead in this
    case.

    Closes-bug: #1454263

    Change-Id: Iecd59d938762089ab639066fa994492a64e92937

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
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.