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):
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
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.
Can you reproduce this issue and send us the appliance information?
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.
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.
(In reply to William Fitzgerald from comment #11)
> 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.
Can you please let me know on which version it is fixed and shipped for on_qa?
It should be fixed on 5.7 also.
Closing this BZ, as it is working as expected.
New commit detected on ManageIQ/manageiq-content/master:
Author: william fitzgerald <email@example.com>
AuthorDate: Wed Oct 25 11:40:49 2017 -0400
Commit: william fitzgerald <firstname.lastname@example.org>
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.
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(-)