Bug 1387504 - Can not choose flavor in dashboard if glance.min_disk > flavor.disk
Summary: Can not choose flavor in dashboard if glance.min_disk > flavor.disk
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 8.0 (Liberty)
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: async
: 8.0 (Liberty)
Assignee: Beth White
QA Contact: Radomir Dopieralski
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-21 06:32 UTC by Chen
Modified: 2020-07-16 08:57 UTC (History)
13 users (show)

Fixed In Version: python-django-horizon-8.0.1-15.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1457745 (view as bug list)
Environment:
Last Closed: 2017-06-14 15:43:56 UTC
Target Upstream Version:


Attachments (Terms of Use)
"Some flavors not meeting minimum image requirements have been disabled" is showing under the flavor selection (66.80 KB, image/png)
2016-10-21 06:32 UTC, Chen
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1677206 0 None None None 2017-05-17 15:43:46 UTC
Red Hat Product Errata RHBA-2017:1471 0 normal SHIPPED_LIVE python-django-horizon bug fix advisory 2017-06-14 19:38:27 UTC

Description Chen 2016-10-21 06:32:52 UTC
Created attachment 1212706 [details]
"Some flavors not meeting minimum image requirements have been disabled" is showing under the flavor selection

Description of problem:

Can not choose flavor in dashboard if glance.min_disk > flavor.disk

Version-Release number of selected component (if applicable):

python-django-horizon-8.0.1-6.el7ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. Create a flavor with Root Disk (GB) = 0
2. Create an image with Minimum Disk (GB) = 1
3. Launch instance and select the image we created in step2.
4. We can not select the flavor we created in step 1 and it is showing grey.

Actual results:

Horizon is making an unnecessary check.

https://github.com/openstack/horizon/blob/stable/liberty/horizon/static/horizon/js/horizon.quota.js#L150

https://github.com/openstack/horizon/blob/stable/liberty/horizon/static/horizon/js/horizon.quota.js#L86

https://github.com/openstack/horizon/blob/stable/liberty/horizon/static/horizon/js/horizon.quota.js#L78


Expected results:

We should be able to launch instance even though glance.min_disk > flavor.disk.

Additional info:

There is no problem if we launch instance from command line.

Comment 1 Radomir Dopieralski 2016-10-21 08:43:33 UTC
This is expected behavior. See bz#1172612.

Comment 2 Junko IKEDA 2016-10-21 09:03:15 UTC
We set "0" to flavor root disk.
How does instance handle this setting? 

OpenStack Docs says; 
http://docs.openstack.org/admin-guide/compute-flavors.html
The "0" size is a special case which uses the native base image size as the size of the ephemeral root volume.

It seems that the flavor which have "0" root disk would not be selected on horizon forever.

Comment 3 Chen 2016-10-21 09:08:43 UTC
Hi Junko, 

Yes your finding is correct. Let me reopen the bugzilla and show some details.

@Radomir would you please have a look at this ? Sorry for an unclear initial description .

In /usr/lib/python2.7/site-packages/nova/compute/api.py

 736             # NOTE(johannes): root_gb is allowed to be 0 for legacy reasons
 737             # since libvirt interpreted the value differently than other
 738             # drivers. A value of 0 means don't check size.

 744                 if image_min_disk > dest_size:
 745                     raise exception.FlavorDiskSmallerThanMinDisk(
 746                         flavor_size=dest_size, image_min_disk=image_min_disk)

We can see that if the root_gb is 0, then nova will not check the disk size. But Horizon seems to be still checking even though the root_gb is 0. Horizon should take care of this situation when root_gb == 0.

Best Regards,
Chen

Comment 4 Chen 2016-10-21 09:12:39 UTC
So in line 739 we will skip the check if root_gb is 0. Horizon should be consistent with nova to some extent.

In /usr/lib/python2.7/site-packages/nova/compute/api.py

 736             # NOTE(johannes): root_gb is allowed to be 0 for legacy reasons
 737             # since libvirt interpreted the value differently than other
 738             # drivers. A value of 0 means don't check size.
 739             if dest_size != 0:
 740                 if image_size > dest_size:
 741                     raise exception.FlavorDiskSmallerThanImage(
 742                         flavor_size=dest_size, image_size=image_size)
 743 
 744                 if image_min_disk > dest_size:
 745                     raise exception.FlavorDiskSmallerThanMinDisk(
 746                         flavor_size=dest_size, image_min_disk=image_min_disk)

Best Regards,
Chen

Comment 5 Radomir Dopieralski 2016-10-21 09:39:55 UTC
I see now, that's looks like a bug indeed, thank you very much for reporting it. I'm sorry for jumping to conclusions.

Comment 6 Chen 2016-10-21 09:54:36 UTC
Hi Radomir,

No worries at all. Sorry for my unclear description.

Best Regards,
Chen

Comment 7 Chen 2016-12-05 05:38:00 UTC
Hi Radomir,

Sorry for the interrupt. It would be appreciated if I can get any progress on the fix.

Thank you very much ! 

Best Regards,
Chen

Comment 9 Chen 2016-12-05 08:14:40 UTC
Hi Radomir,

Thank you for your update.

I'm increasing the priority because the customer is keen on the fix of this bug.

Best Regards,
Chen

Comment 12 Chen 2017-01-09 07:25:55 UTC
Hi Anandeep,

Thank you for your help on this bugzilla.

If you got any progress about this bug please let me know.

Best Regards,
Chen

Comment 13 Anandeep Pannu 2017-01-25 15:39:41 UTC
Assigned, on backlog but nothing to report yet.

Comment 14 Chen 2017-03-15 14:27:53 UTC
Hi,

Do we have any news about the progress?

Best Regards,
Chen

Comment 15 Beth White 2017-03-16 11:12:25 UTC
Hi Chen,

There is not currently any further big update on this, however, we are aware of the bug and we will be working on it during the next sprint and have a further update on progress soon.

Thanks,
Beth

Comment 27 Radomir Dopieralski 2017-06-02 08:40:55 UTC
I can verify that this now works as expected: I can select flavors with 0GB disks when an image with min disk 2GB is selected.

Comment 28 Chen 2017-06-05 02:34:13 UTC
Hi Beth, Radomir,

Thank you for your great help. I can see the function has been verified by Radomir.

Is there any news about the downstream release date or hotfix if it's hard to make it before the deadline ?

Best Regards,
Chen

Comment 29 Beth White 2017-06-08 15:10:33 UTC
Hi Chen,

This bug has been fixed and verified for OSPs 8, 9 and 10. We are working to have it delivered in OSP8 next week.

Thanks,
Beth

Comment 31 Beth White 2017-06-14 12:51:53 UTC
This bug has been fixed and merged upstream for the current release and it will be delivered in OSP8 this week.

Comment 32 errata-xmlrpc 2017-06-14 15:43:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1471


Note You need to log in before you can comment on or make changes to this bug.