Zero-byte image snapshot leads to error launching an instance from snapshot

Bug #1374931 reported by Luo Gangyi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Gary W. Smith

Bug Description

When I try to launch an instance of snapshot image (which was a snapshot of a volume-backed instance), the 'launch button' has no response.

How to reproduce:
1. Launch an instance by using "boot from image(create new volume)"
2. Take a snapshot of this instance, this operation will produce a image which size is 0 byte.
3. Launch an instance by using the image generated in step 2, the 'launch button' has no response.

If I open the console of web browser, I can see the Error Message
 "An invalid form control with name='volume_size' is not focusable. "

Tags: volume
Changed in horizon:
status: New → Confirmed
importance: Undecided → High
tags: added: volume
removed: snapshot volume-backed
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Cinder seems to be reporting the size of the volume correctly (1GB). If you attempt to launch in image from that volume via the Project -> Compute -> Volumes page, it works correctly.

But on the instances page, nova is reporting the size to be 0 bytes; also evidenced by nova image-show giving OS-EXT-IMG-SIZE:size of 0. So indications point to a bug in nova at this point. Will update with additional findings.

Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

It seems to me that even if it is a bug in nova, that the Launch action should be disallowed in the images page if the size is 0, since it will lead down into this rathole for the user.

summary: - No response on launch an instance from volume snapshot
+ Javascript error prevents launching an instance from volume snapshot
Changed in horizon:
milestone: none → juno-rc1
Revision history for this message
Gary W. Smith (gary-w-smith) wrote : Re: Javascript error prevents launching an instance from volume snapshot

Note that glance, whose client is responsible for querying the data for the launch instance dialog, is also returning 0 for the size

summary: - Javascript error prevents launching an instance from volume snapshot
+ Zero-byte image snapshot leads to error launching an instance from
+ snapshot
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
assignee: nobody → Gary W. Smith (gary-w-smith)
status: Confirmed → In Progress
Revision history for this message
Gary W. Smith (gary-w-smith) wrote :

Per the discussion in gerrit, the zero-byte snapshot is normal from nova/glance, as it reflects that fact that no space is being taken in glance, since the volume snapshots are stored in cinder.

no longer affects: nova
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/125479
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=63a5ad95f581354abf60c67a9f865041f5d5e05f
Submitter: Jenkins
Branch: master

commit 63a5ad95f581354abf60c67a9f865041f5d5e05f
Author: Gary W. Smith <email address hidden>
Date: Wed Oct 1 16:48:49 2014 -0700

    Enable launching instance from zero-size image snapshot

    Remove the general hardcoded minimum of 1GB volume size on the create
    instance workflow, and selectively enforce it when the volume size field
    is used and editable: namely, when launching an instance from an image
    and creating a new volume.

    This general minimum was preventing the launch of instances from image
    snapshots (whose size is reported as 0) by causing browser errors as the
    browser tried to highlight the error of the invisible size field.

    Closes-Bug: 1374931
    Change-Id: Ied0eb41f5198d935bbb0896e5004ea78176bc2b8

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-rc1 → 2014.2
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.