flavor disk size failed to take effect using LVM image backend

Bug #1101137 reported by Qiu Yu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Qiu Yu

Bug Description

Steps to reproduce
--
1. Use LVM as image backend
2. Create instance with image size smaller than disk size in flavor type.

Say image of 1 gigabyte and flavor of 20 disk size of gigabytes
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 1e80200d2b277f018791804ef4711a71 |
| container_format | bare |
| created_at | 2012-12-03T12:08:47 |
| deleted | False |
| disk_format | raw |
| id | 0377b740-492c-484a-9f6e-46a998e1c116 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | centos-6u3-template |
| owner | 1f920603ce804814bcd7f734ce358d5b |
| protected | False |
| size | 1073741824 |
| status | active |
| updated_at | 2012-12-03T12:09:11 |
+------------------+--------------------------------------+

+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public | extra_specs |
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+-------------+
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True | {} |

Expected result
--
20 gigabytes available for newly created instance

Actual result
--
Filesystem could only recognize 1 gigabyte inside the instance.

Qiu Yu (unicell)
Changed in nova:
assignee: nobody → unicell (unicell)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/20015
Committed: http://github.com/openstack/nova/commit/485e4bdb921c5e2b53af2886c53f4c93b8bf3be8
Submitter: Jenkins
Branch: master

commit 485e4bdb921c5e2b53af2886c53f4c93b8bf3be8
Author: unicell <email address hidden>
Date: Fri Jan 18 18:48:10 2013 +0800

    Run_as_root to ensure resize2fs succeed for all image backends

    Unlike other file based image backend, operation over LVM
    logical volumes requires root to functioning correctly. Resize2fs
    on logical volumes also need run_as_root.

    Otherwise, when running nova-compute as non-root user, instance
    creation with flavor disk size larger than image size would fail.
    Caused by resize2fs failure.

    Fixes LP# 1101137

    Change-Id: I16a2aa4382be58843270ff23e11bfb1e20c568d2

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
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.