Bug 1465087 - Service template provisioning request do not honour quotas
Summary: Service template provisioning request do not honour quotas
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.8.2
Assignee: William Fitzgerald
QA Contact: Aziza Karol
URL:
Whiteboard: quota:service
Depends On: 1455844 1488313
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-26 15:48 UTC by Satoe Imaishi
Modified: 2022-07-09 08:48 UTC (History)
11 users (show)

Fixed In Version: 5.8.2.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1455844
Environment:
Last Closed: 2017-10-24 00:16:35 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
provisioning from lifecycle (106.06 KB, image/png)
2017-09-05 11:03 UTC, Aziza Karol
no flags Details
service provisioning (106.96 KB, image/png)
2017-09-05 11:05 UTC, Aziza Karol
no flags Details
service provisioning with user as quota source (177.39 KB, image/png)
2017-09-05 12:31 UTC, Aziza Karol
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3005 0 normal SHIPPED_LIVE Important: Red Hat CloudForms security, bug fix, and enhancement update 2017-10-24 04:15:49 UTC

Comment 2 CFME Bot 2017-08-04 13:58:01 UTC
New commit detected on ManageIQ/manageiq-content/fine:
https://github.com/ManageIQ/manageiq-content/commit/30bba6f72010eb612e03e7cc254bd6e602bc69e6

commit 30bba6f72010eb612e03e7cc254bd6e602bc69e6
Author:     Greg McCullough <gmccullo>
AuthorDate: Wed Jun 21 15:07:27 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Fri Aug 4 09:56:42 2017 -0400

    Merge pull request #128 from billfitzgerald0120/requested_number_of_vms
    
    Fixed quota calculations for multiple vms in requested method.
    (cherry picked from commit 85dd4414d6d6c4a8bc3b726bac5625974c7caad3)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1465087

 .../QuotaMethods.class/__methods__/requested.rb    | 33 +++++++++++-----------
 .../method_validation/calculate_requested_spec.rb  | 18 ++++++++++++
 2 files changed, 35 insertions(+), 16 deletions(-)

Comment 3 Aziza Karol 2017-09-05 11:01:23 UTC
Wrong quota calculations for multiple vms when provision via services.

Observations:

1.When you provision an instance Using: Lifecycle -> Provision instances with  number of instances:25 flavor: m1.tiny the quota calculation message 
shows "Request exceeds maximum allowed for the following: (storage - Used: 5 GB plus requested: 25 GB exceeds quota: 4 GB)

Note:number of instance count is considered in quota calculations.


2.When you provision using services catalogs with same number of instances:25 & flavor: m1.tiny the quota calculation message 
shows "Request exceeds maximum allowed for the following: (storage - Used: 5 GB plus requested: 1 GB exceeds quota: 4 GB)

Note:No of instance is not considered in quota calculation as the requested shows only 1GB instead of 25GB.

Quota calculations when provisioning via services should be fixed.


My appliance for reference: https://10.8.197.134.
Screenshots attached.

Version:5.8.2.0.20170824192913_b09a5f8

Comment 4 Aziza Karol 2017-09-05 11:03:12 UTC
Created attachment 1322163 [details]
provisioning from lifecycle

Comment 5 Aziza Karol 2017-09-05 11:05:06 UTC
Created attachment 1322164 [details]
service provisioning

Comment 7 Aziza Karol 2017-09-05 12:31:30 UTC
Created attachment 1322190 [details]
service provisioning with user as quota source

Comment 8 William Fitzgerald 2017-09-05 19:05:32 UTC
Aziza,

Is is ok for me to use your appliance ?

Comment 9 Aziza Karol 2017-09-06 04:47:23 UTC
William,

Sure, you can use it.

Thanks,
Aziza

Comment 10 William Fitzgerald 2017-09-06 19:11:14 UTC
Aziza,

  If you look at https://bugzilla.redhat.com/show_bug.cgi?id=1488313, it will explain  how to select a flavor (instance_type in your dialog).  The error is coming because your dialog doesn't work.  You can change your dialog to use a drop down list or the extra code in the BZ above. 

This is not a bug.

Let me know if you have questions ...

Thanks

Billy

Comment 11 William Fitzgerald 2017-09-14 19:56:15 UTC
Aziza,

  If you look at https://bugzilla.redhat.com/show_bug.cgi?id=1488313, it will explain  how to select a flavor (instance_type in your dialog).  The error is coming because your dialog doesn't work.  You can change your dialog to use a drop down list or the extra code in the BZ above. 

This is not a bug.

Let me know if you have questions ...

Thanks

Billy

Comment 13 William Fitzgerald 2017-09-18 14:50:29 UTC
Aziza,


I tried your appliance on Friday and today and I can't logon.  Can you re-create?

Thanks

Billy

Comment 15 William Fitzgerald 2017-09-21 14:50:31 UTC
Aziza,

I checked your appliance.  If you want to select the flavor/instance, you will have to build a dynamic dialog.  These values can't be text values.  You will need to write a method that looks up the flavor and returns that value.  I was looking around for a sample but couldn't find one for you.

Hope this helps ...

Billy

Comment 16 William Fitzgerald 2017-09-21 21:16:31 UTC
Aziza,

 I found a sample dynamic method, modified your dialog and it works.  I added a Billy domain with the method. Let me know if you have any questions.

Thanks

Billy

Comment 17 Aziza Karol 2017-09-22 11:08:13 UTC
Hey Billy,

I tried provisioning with your dynamic method on the same applaince.I am not getting `root_disk_size' error but it is still not honoring quotas. I selected  m1.xlarge flavor while provisioning but did not get any quota exceeded msg.
Can you please check?

Also, Do we have to build the dynamic dialog for number of instances as well?.

Thanks,
Aziza

Comment 18 William Fitzgerald 2017-09-22 14:00:28 UTC
Aziza,

You don't need a dynamic dialog for instances.  I tried asking for 6 vms and it didn't work.  I changed your dialog value for number_of_vms to option_0_number_of_vms and it works. 

Can you try it now ?

Let me know how it works.

Thanks

Billy

Comment 19 Aziza Karol 2017-09-25 11:40:50 UTC
Hi Billy,

In the dialog you changed value for number_of_vms to option_0_number_of_vms. How are we suppose to know that it has to be prefix with option_0?. Do we have any documentation around that. Can you point me to that please?


Also I tried provisioning 7 vms and i get quota exceeded messages for user and group quota but when i tried provisioning by selecting a large flavor(ex. m1.xlarge) i do not get any quota exceed message for storage.  

For reference please check request Id 16 on same appliance.


Thanks,
Aziza

Comment 20 William Fitzgerald 2017-09-25 19:50:27 UTC
Aziza, 

I found a good example here for dialogs.

https://pemcg.gitbooks.io/introduction-to-cloudforms-automation/content/chapter17/creating_a_service_item.html

There is something wrong with the dialog.  Even when I select large or xlarge,
quota thinks it tiny.  Not sure why but looking into this now.

Thanks

Billy

Comment 21 Aziza Karol 2017-09-26 05:12:14 UTC
Hey Billy,

Thanks for the link.Let me know if there is any further changes in the dialog.

~~Aziza

Comment 22 William Fitzgerald 2017-09-27 15:36:02 UTC
Aziza/Shveta,

The reported issue is when the number of vms specified in the catalog item is greater than 1.

The attached fix resolves this issue, but does not resolve the issue of the dialog override for the number of vms.

Could you test/validate this fix by modifying the catalog item number of vms and open a separate ticket for the dialog override of number of vms.

Let me know if you have any questions.

Thanks

Billy

Comment 23 William Fitzgerald 2017-09-27 16:13:56 UTC
Aziza/Shveta,

I created 3 new services with that don't use dialog overrides in your appliance.

openstack_tiny_1  - request 28
openstack_xlarge_1 - request 29
openstack_xlarge_3 - request 30

These are working properly.

Let me know if you have any questions.

Thanks

Billy

Comment 24 Shveta 2017-09-27 20:24:51 UTC
Request shows quota error when number of vm's specified is more than 1 in dialog.
Verified in 5.8.2.0.20170824192913_b09a5f8 .

Dialog values for VM number is overridden correctly.

Comment 25 Sachin 2017-10-03 06:12:52 UTC
(In reply to William Fitzgerald from comment #22)
> Aziza/Shveta,
> 
> The reported issue is when the number of vms specified in the catalog item
> is greater than 1.
> 
> The attached fix resolves this issue, but does not resolve the issue of the
> dialog override for the number of vms.
> 
> Could you test/validate this fix by modifying the catalog item number of vms
> and open a separate ticket for the dialog override of number of vms.
> 
> Let me know if you have any questions.
> 
> Thanks
> 
> Billy

I've opened new BZ for provisioning VMs using dialog

https://bugzilla.redhat.com/show_bug.cgi?id=1497912

Comment 27 errata-xmlrpc 2017-10-24 00:16:35 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


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