Creating a volume from an instance snapshot should validate the volume size / min_disk

Bug #1368600 reported by Julie Pichon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Julie Pichon
Icehouse
Fix Released
Low
Julie Pichon

Bug Description

This is sort of a follow-up to bug 1241253. When an image is created based on an instance snapshot, even though the same min_disk restrictions apply, they're not reflected properly in the validation and tool tips, resulting in misleading information being shown to the user.

Steps to reproduce:
-------------------------
1. Create an image with a minimum disk size of e.g. 2GB
2. Boot an instance from the image
3. Create a snapshot of the instance (from dashboard or using nova create-image)
4. Back on the images panels, click the "Create volume" button for the new image
5. The prefilled size and size tooltip do not indicate the correct minimum disk size

This seems to be happening because in that case the min_disk attribute is set as a property rather than a direct attribute, looking at Glance:

$ glance image-show <id_of_image>
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
...
| min_disk | 2 |
...

$ glance image-show <id_of_instance_snapshot>
+---------------------------------+------------------------+
| Property | Value |
+---------------------------------+------------------------+
...
| Property 'min_disk' | 2 |
...
| min_disk | 0 |
...

I'm not sure why... Maybe someone from Glance could shed some light on this and whether that's the expected behaviour?

In the meantime it shouldn't be too hard for Horizon to handle the case where min_disk is set as a property.

Tags: image volume
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/121023

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

Reviewed: https://review.openstack.org/121023
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=6b62f616b1d6f7d71a34ea59ba8c8120745915f4
Submitter: Jenkins
Branch: master

commit 6b62f616b1d6f7d71a34ea59ba8c8120745915f4
Author: Julie Pichon <email address hidden>
Date: Thu Sep 11 14:44:08 2014 +0100

    Set the correct min_disk size when creating volume from image

    Sometimes the image min_disk size is specified in a property rather
    than the min_disk attribute (for instance, after creating a snapshot
    from an instance). This ensures that the correct tooltip and error
    message are displayed in these cases too.

    Change-Id: I0c7a87a6f00c4cc1a54f8b70e5df9bb1d05de866
    Closes-Bug: #1368600

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → juno-rc1
Revision history for this message
Julie Pichon (jpichon) wrote :

For reference, I opened bug 1369854 to see whether having min_disk/size only as properties is the expected behaviour in this case.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/121755

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/icehouse)

Reviewed: https://review.openstack.org/121755
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=737fe401736017bb94875b676addf637abaa8edf
Submitter: Jenkins
Branch: stable/icehouse

commit 737fe401736017bb94875b676addf637abaa8edf
Author: Julie Pichon <email address hidden>
Date: Thu Sep 11 14:44:08 2014 +0100

    Set the correct min_disk size when creating volume from image

    Sometimes the image min_disk size is specified in a property rather
    than the min_disk attribute (for instance, after creating a snapshot
    from an instance). This ensures that the correct tooltip and error
    message are displayed in these cases too.

    Change-Id: I0c7a87a6f00c4cc1a54f8b70e5df9bb1d05de866
    Closes-Bug: #1368600
    (cherry picked from commit 6b62f616b1d6f7d71a34ea59ba8c8120745915f4)

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.