Bug 1371259

Summary: Counter for multiple provisioning counts even failed provisions
Product: Red Hat CloudForms Management Engine Reporter: Matouš Mojžíš <mmojzis>
Component: ProvisioningAssignee: Greg McCullough <gmccullo>
Status: CLOSED WONTFIX QA Contact: Matouš Mojžíš <mmojzis>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.6.0CC: jhardy, obarenbo
Target Milestone: GA   
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: provision
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-30 12:39:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matouš Mojžíš 2016-08-29 17:21:39 UTC
Description of problem:


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

How reproducible:
Always

Steps to Reproduce:
1. Do a provision of for example three instances
2. Provision fails
3. Do that provision again, but without fails

Actual results:
Three instances that are successfully provided have name like $instance_0003 - $instance_0005.

Expected results:
When provision fails it shouldn't be counted and next provision number in name should start where this provision did.

Additional info:

Comment 2 Greg McCullough 2016-08-30 12:39:05 UTC
This feature is currently working as designed and there are no plans to change it at this time.

The implementation is designed to ensure unique values are provided for VM names as well as being efficient.  To provide this functionality only the last returned index value is stored for a given naming pattern.  When a new value is requested for a pattern the current value is incremented and returned.  This is performed while locking the row in the database to ensure sequential access to the next value.

There is no support for reusing values due to failed provision requests.