creation image for volume-backend instance should use volume size in image property 'min_disk'

Bug #1646740 reported by wanghao
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Medium
bryan

Bug Description

Description
===========
Currently, Nova is using disk size in flavor to set min_disk property in image when creating instance snapshot, even if it's a volume-backend instance. If disk size in flavor is bigger than volume size, there is a issue that Nova will raise "Volume is smaller than the minimum size specified in image metadata" when use this image to create a new instance.

Nova should set min_disk just using volume size if it's a volume-backend instance.

Steps to reproduce
==================
1. Create volume-backend instance with 1G size volume but flavor has 2G disk size.
2. Creation of instance is successful and then create a snapshot for this instance.
3. The image is created successfully, and the property min_disk of image is 2G.
4. Create a new instance by using this image.

Expected result
===============
The new instance created successfully.

Actual result
=============
Nova returns 400 error: " Volume is smaller than the minimum size specified in image metadata. Volume size is 1073741824 bytes, minimum size is 2147483648 bytes."

Environment
===========
commit 5f465e83e2c2987c7b546e2e73fd926c6956aa4b
Merge: c10ff21 19a52c9
Author: Jenkins <email address hidden>
Date: Mon Nov 14 21:26:07 2016 +0000

    Merge "Remove ceph install/config functions from l-m hook"

hypervisor: libvirt+KVM
storage: LVM

wanghao (wanghao749)
Changed in nova:
assignee: nobody → wanghao (wanghao749)
Revision history for this message
Matt Riedemann (mriedem) wrote :

I guess we could question what to do if there are multiple volumes attached to the instance when we create the snapshot, but I'd think we'd set the min_disk in the image meta based on the root volume's size.

tags: added: volue
tags: added: snapshot volumes
removed: volue
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
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/407397

Changed in nova:
status: Triaged → In Progress
Revision history for this message
Nazeema Begum (nazeema123) wrote :

Is anyone still working on this bug ..!

bryan (lcsong)
Changed in nova:
assignee: wanghao (wanghao749) → bryan (lcsong)
Changed in nova:
assignee: bryan (lcsong) → wanghao (wanghao749)
Changed in nova:
assignee: wanghao (wanghao749) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → bryan (lcsong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by wanghao (<email address hidden>) on branch: master
Review: https://review.openstack.org/407397
Reason: working on https://review.openstack.org/#/c/605596/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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