Bug 1481449

Summary: Instance Type on Provision Instances remains empty after adding flavor which has disk size of 0
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ProvidersAssignee: Tzu-Mainn Chen <tzumainn>
Status: CLOSED ERRATA QA Contact: Ido Ovadia <iovadia>
Severity: high Docs Contact:
Priority: medium    
Version: 5.8.0CC: cpelland, gblomqui, iovadia, jfrey, jhardy, maufart, obarenbo, tzumainn
Target Milestone: GAKeywords: ZStream
Target Release: 5.8.2   
Hardware: x86_64   
OS: Linux   
Whiteboard: openstack
Fixed In Version: 5.8.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1472420 Environment:
Last Closed: 2017-10-24 00:39:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On: 1472420    
Bug Blocks:    
Attachments:
Description Flags
Flavor with disk=0 doesn't available none

Comment 2 CFME Bot 2017-08-14 22:16:16 UTC
New commit detected on ManageIQ/manageiq/fine:
https://github.com/ManageIQ/manageiq/commit/b82ee02ee90afa931746acfb7a90251801f82622

commit b82ee02ee90afa931746acfb7a90251801f82622
Author:     Marek Aufart <aufi.cz>
AuthorDate: Mon Aug 14 15:57:44 2017 +0200
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Aug 14 18:12:44 2017 -0400

    Merge pull request #72 from tzumainn/provision-check-update
    
    Update provision requirements check to allow exact matches
    (cherry picked from commit 48424c966ddbd2e58b536d4fa239a40466e8280f)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1481449

 .../manageiq/providers/openstack/cloud_manager/provision_workflow.rb  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 3 Ido Ovadia 2017-08-30 12:53:29 UTC
Failed QA
=========
CFME version 5.8.2.0

I created a Flavor1 with Disk = 0 
 
[stack@undercloud-0 ~]$ openstack flavor list
+--------------------------------------+--------+------+------+-----------+-------+-----------+
| ID                                   | Name   |  RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+--------+------+------+-----------+-------+-----------+
| 1                                    | Flavo1 |  512 |    0 |         0 |     1 | True      |
| 2                                    | Flavo2 |  512 |    1 |         0 |     1 | True      |
| 8dcc67ab-6a2f-45f5-be4e-7ca1858579fa | Flavo3 | 1024 |    2 |         0 |     2 | True      |
+--------------------------------------+--------+------+------+-----------+-------+-----------+
[stack@undercloud-0 ~]$ openstack flavor show Flavo1
+----------------------------+--------+
| Field                      | Value  |
+----------------------------+--------+
| OS-FLV-DISABLED:disabled   | False  |
| OS-FLV-EXT-DATA:ephemeral  | 0      |
| access_project_ids         | None   |
| disk                       | 0      |
| id                         | 1      |
| name                       | Flavo1 |
| os-flavor-access:is_public | True   |
| properties                 |        |
| ram                        | 512    |
| rxtx_factor                | 1.0    |
| swap                       |        |
| vcpus                      | 1      |
+----------------------------+--------+

On Provision Instances --> Properties, Flavor1 does not available as instance type.

Sreenshot enclosed

Comment 4 Ido Ovadia 2017-08-30 12:55:35 UTC
Created attachment 1320071 [details]
Flavor with disk=0 doesn't available

Comment 5 Tzu-Mainn Chen 2017-08-30 14:33:45 UTC
Hi! This is actually because the minimum disk check looks at two things. From the ruby code:

    minimum_disk_required   = [source.hardware.size_on_disk.to_i, source.hardware.disk_size_minimum.to_i].max

The disk_size_minimum for the cirros image may be 0, but the actual size of the image is 9761280, so CloudForms will use the size of the image as the minimum_disk_required. This seems like a legit check to me, what do you think?

Comment 6 Ido Ovadia 2017-09-06 14:01:42 UTC
Verified
========

CFME version 5.8.2.0

Comment 8 errata-xmlrpc 2017-10-24 00:39:41 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/RHSA-2017:3005