Bug 1497912 - Provisioning multiple VMs using service dialogs do not honour quotas
Summary: Provisioning multiple VMs using service dialogs do not honour quotas
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.3
Assignee: William Fitzgerald
QA Contact: Vatsal Parekh
URL:
Whiteboard: quota:service
Depends On:
Blocks: 1489507
TreeView+ depends on / blocked
 
Reported: 2017-10-03 06:11 UTC by Sachin
Modified: 2021-06-10 13:10 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-17 20:19:14 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sachin 2017-10-03 06:11:51 UTC
Description of problem:

Seems when provisioning multiple VMs using life-cycle the quota issue is fixed in BZ#1465087 but the issue still exist when provisioning VMs using service dialogs(field: number_of_vms). 


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

How reproducible:
Always

Steps to Reproduce:
1. Create a service dialog with field: number_of_vms
2. Attach that dialog to catalog
3. set 'max_vms' to value 5 in  / Custom / Cloud / VM / Provisioning / StateMachines / ProvisionRequestApproval / Default
4. Provision 10 vms 

Actual results:


Expected results:


Additional info:

Comment 2 Dave Johnson 2017-10-03 06:44:56 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set it to Low/Low.

Comment 7 William Fitzgerald 2017-11-22 15:17:16 UTC
Vatsal,

 Can you reproduce this issue and send us the appliance information?

Thanks

Billy

Comment 11 William Fitzgerald 2017-11-28 16:17:12 UTC
Vatsal,

I changed your dialog field name to option_0_number_of_vms.

I changed tenant quota to Allocated Number of Virtual Machines to 1.

When I order the service, Quota denies it.

This is working for me.

Thanks 

Billy

Comment 13 Tina Fitzgerald 2017-11-29 20:11:59 UTC
Hi Vatsal,

As Billy mentioned in comment 11, he changed the Tenant quota Allocated number of Virtual machines to 1. When we checked your appliance logs, we noticed that there were no quota limits set, so quota was not used. You need to set at least one Tenant quota value to enable quota.

Let me know if you have any questions.

Thanks,
Tina

Comment 14 Vatsal Parekh 2017-11-30 12:36:02 UTC
(In reply to William Fitzgerald from comment #11)
> Vatsal,
> 
> I changed your dialog field name to option_0_number_of_vms.
> 
> I changed tenant quota to Allocated Number of Virtual Machines to 1.
> 
> When I order the service, Quota denies it.
> 
> This is working for me.
> 
> Thanks 
> 
> Billy

Can you please let me know on which version it is fixed and shipped for on_qa?

Comment 15 William Fitzgerald 2017-11-30 17:56:36 UTC
Vatsal,

It should be fixed on 5.7 also.

Billy

Comment 16 Vatsal Parekh 2017-12-05 15:21:38 UTC
Closing this BZ, as it is working as expected.

Comment 23 CFME Bot 2018-04-18 19:32:49 UTC
New commit detected on ManageIQ/manageiq-content/master:

https://github.com/ManageIQ/manageiq-content/commit/53f0acd0d1d32aa339da08d2f2d23b8d9cbefdcc
commit 53f0acd0d1d32aa339da08d2f2d23b8d9cbefdcc
Author:     william fitzgerald <wfitzger>
AuthorDate: Wed Oct 25 11:40:49 2017 -0400
Commit:     william fitzgerald <wfitzger>
CommitDate: Wed Oct 25 11:40:49 2017 -0400

    Calculate quota using service dialogs overrides.

    Changed requested method to use dialog overrides in quota calculations.

    Modified requested method to calculate quota based on dialog values for:
    number_of_sockets, cores_per_socket, number_of_cpus, vm_memory and storage.

    This can be tested by using service dialogs using these values.

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

    Testing

    Create a service using service dialog overrides values for the above values.
    You can use one or more override values.
    Order the service, change some values and run.

    Note: We are honoring number_of_vms in a service dialog but not using number_of_vms in quota calculations. Doing quota calculations for number_of_vms in a service dialog will be in
    a followup PR.

    I am including screenshots of a dialog using some values.

 content/automate/ManageIQ/System/CommonMethods/QuotaMethods.class/__methods__/requested.rb | 35 +-
 spec/automation/unit/method_validation/calculate_requested_spec.rb | 83 +
 2 files changed, 116 insertions(+), 2 deletions(-)


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