diskimage-builder 2GB image does not boot in 2GB flavor

Bug #1513622 reported by Michael Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
High
Michael Johnson

Bug Description

The Octavia project uses disk-image-create to build the amphora service VM image. We use the --image-size 2 setting to generate a 2GB image that boots in a 2GB Nova flavor.

Recently we have started to get the following error from Nova with newly created images:

n-cpu.log.2015-11-04-172820:2015-11-05 09:59:49.644 TRACE nova.compute.manager [instance: 76d91eed-8cbc-47d4-b59e-1d10a0ee7c31] FlavorDiskSmallerThanImage: Flavo 's disk is too small for requested image. Flavor disk is 2147483648 bytes, image is 2214658048 bytes.

This causes a 2GB diskimage-builder image to not boot in a 2GB flavor an longer.

Revision history for this message
Michael Johnson (johnsom) wrote :
Revision history for this message
Ben Nemec (bnemec) wrote :

This is most likely caused by https://github.com/openstack/diskimage-builder/commit/f84b910f152220294a723836a71586974efadede

It moved the ext4 size manipulation code out of the else block so it will get run even when a specific image size is provided. I think we should move it back to the else block, which will hopefully fix this problem, and even if it doesn't that was a backwards compatibility breaking change since it's not how this worked before.

Changed in diskimage-builder:
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

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

Changed in diskimage-builder:
assignee: nobody → Michael Johnson (johnsom)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/242273
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=590dce8dcc70949f5e60fbab205d777ed31c282a
Submitter: Jenkins
Branch: master

commit 590dce8dcc70949f5e60fbab205d777ed31c282a
Author: Michael Johnson <email address hidden>
Date: Thu Nov 5 21:49:28 2015 +0000

    Fix diskimage-builder image size

    This patch fixes the calculation of the resultant image size
    when building an image with diskimage-builder on ext4 a
    filesystem.

    Prior to this, using the '--image-size 2' (2GB) setting would
    generate an image that would not boot under a 2GB nova flavor.

    Change-Id: I7a753bdef84c6300ccea73ae4a92bf330dcd77cb
    Closes-Bug: #1513622

Changed in diskimage-builder:
status: In Progress → Fix Committed
Changed in diskimage-builder:
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.