"Boot from volume" fails on image size restriction

Bug #1563529 reported by Peter Slovak
52
This bug affects 11 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Ziyu Bai

Bug Description

When launching an instance with options "Boot from volume" or "Boot from volume snapshot (creates a new volume)", Horizon (rightfully) doesn't make it possible to specify volume size. Yet it uses the default "volume_size" value of 1, which is defined as initial in the form [0].

When Nova API processes this request, it also tries to verify the new volume size vs. minimum disk size, because "volume_size" is set [1]. This check will fail if your image requires a disk more than 1 GiB in size.

I naively tried just not sending "volume_size" to the Nova API, but this triggered some other errors. Preferably, Horizon should be setting the "volume_size" accordingly to the volume or snapshot that has been chosen, similar to booting from image [2].

As a quick fix, you can set the disk requirements of your images to no more than 1 GiB. But you also have to re-create the affected volumes, since this min_disk metadata gets burned into them.

----------
Steps to reproduce:

0) Create a Glance image with a requirement of more than 1 GiB of disk space (2 if you don't trust yourself with the GB/GiB fuss)
1) Navigate to Compute -> Volumes and create a new bootable volume from that image, with plenty of space (10 GiB).
2) Launch an instance from that volume, either from Volumes or Instances screen.
3) Enjoy the VolumeSmallerThanMinDisk exception.

Note that the CLI-equivalent process works as expected, for obvious reasons.
----------

[0] https://github.com/openstack/horizon/blob/stable/liberty/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py#L116
[1] https://github.com/openstack/nova/blob/stable/liberty/nova/compute/api.py#L725
[2] https://github.com/openstack/horizon/blob/stable/liberty/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py#L444

tags: added: horizon
tags: removed: horizon
description: updated
Changed in horizon:
importance: Undecided → High
status: New → Confirmed
Changed in horizon:
milestone: none → newton-1
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Just wanted to note that this doesn't occur in the Angular Launch Instance workflow.

Changed in horizon:
assignee: nobody → Rob Cresswell (robcresswell)
Changed in horizon:
milestone: newton-1 → newton-2
tags: added: mitaka-backport-potential
Changed in horizon:
milestone: newton-2 → newton-3
Changed in horizon:
milestone: newton-3 → newton-rc1
Changed in horizon:
milestone: newton-rc1 → next
Akihiro Motoki (amotoki)
tags: removed: mitaka-backport-potential
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Lowered priority because we don't have the people to fix everything and this is on an old workflow.

Changed in horizon:
assignee: Rob Cresswell (robcresswell) → nobody
importance: High → Medium
Changed in horizon:
assignee: nobody → Ziyu Bai (baiziyu-inspur)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.opendev.org/680603

Changed in horizon:
status: Confirmed → In Progress
Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
Vishal Manchanda (vishalmanchanda) wrote :

@Ziyu I was unable to reproduce this bug. Could you help me to reproduce it?
Please find below the steps I have executed and let me know what I have missed.
1. Created a Glance image size 2GB.
2. create a new bootable volume from that image, with volume size 10Gb.
3. Launch a new instance from this volume and instance launched successfully. No exception raised.

Revision history for this message
Ziyu Bai (baiziyu-inspur) wrote :

Hi Manchanda,
The full steps:
1. Create a Glance Image, Size 2GB, Min Disk Requirement 2GB.
2. Create a Volume Using this Image.
3. Launch a new Instance from the volume. When choosing flavor, disk less than 2GB cannot be chosen.

So it's not right. When launch a instance from volume, disk shouldn't be restricted any more.

Revision history for this message
Ziyu Bai (baiziyu-inspur) wrote :

Hi everyone, is there anything should I do about this review?

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

Reviewed: https://review.opendev.org/680603
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5d7e3eac0f99277237ce9bb400083bbee76889b5
Submitter: Zuul
Branch: master

commit 5d7e3eac0f99277237ce9bb400083bbee76889b5
Author: 白子玉 <email address hidden>
Date: Fri Sep 6 16:00:26 2019 +0800

    Remove flavor disk size ckeck when create instance from volume

    No longer check flavor disk size larger or equal than image's mix disk when
    you create instance from volume, because it's already checked when creating
    volume.

    Change-Id: I8e4fc074aafe7e880ceb7ab06d8ef565709beeeb
    Closes-Bug: #1563529

Changed in horizon:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 18.1.0

This issue was fixed in the openstack/horizon 18.1.0 release.

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.