Bug 1194319 - Same VM name is Assigned on Two Separate Provisions
Summary: Same VM name is Assigned on Two Separate Provisions
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.4.0
Assignee: Bill Wei
QA Contact: Milan Falešník
Depends On:
Blocks: 1195825
TreeView+ depends on / blocked
Reported: 2015-02-19 14:43 UTC by Josh Carter
Modified: 2019-07-11 08:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1195825 (view as bug list)
Last Closed: 2015-06-16 12:51:10 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)
Provision naming hotfix (18.50 KB, application/x-tar)
2015-02-23 17:00 UTC, Greg McCullough
no flags Details
Provision name seeding script (1.28 KB, application/zip)
2015-02-23 17:00 UTC, Greg McCullough
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Josh Carter 2015-02-19 14:43:58 UTC
Created attachment 993647 [details]

Description of problem:

There appears to be a condition in which two provisions happen within close enough proximity of each other to cause the same name to be assigned to both.

This appears to be related to the following bit of code in our CloudForms method:  derived_vm_name << "$n{4}"
This should be appending a different number for both provisions, but instead assigned the same number in this particular instance.

I've included some logs relating to this occurrence.

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

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

Comment 3 CFME Bot 2015-02-23 15:31:08 UTC
New commit detected on cfme/5.3.z:

commit 5442dc86ed9692c16b8719bbeefdb3fbd4900902
Author:     Bill Wei <bilwei@redhat.com>
AuthorDate: Thu Jan 15 11:59:49 2015 -0500
Commit:     Bill Wei <bilwei@redhat.com>
CommitDate: Mon Feb 23 10:23:29 2015 -0500

    Store next naming sequence in custom_attributes
    With this implemenation naming sequences are global through current region.
    The binding can be changed to other models through NamingSequenceMixin.

 vmdb/app/models/miq_provision/naming.rb         | 28 ++++++++-----------------
 vmdb/app/models/miq_region.rb                   |  2 +-
 vmdb/app/models/mixins/naming_sequence_mixin.rb | 17 +++++++++++++++
 vmdb/spec/models/miq_provision_spec.rb          | 18 ++++++++++++++++
 vmdb/spec/models/miq_region_spec.rb             |  7 +++++++
 5 files changed, 52 insertions(+), 20 deletions(-)
 create mode 100644 vmdb/app/models/mixins/naming_sequence_mixin.rb

Comment 4 Greg McCullough 2015-02-23 17:00:04 UTC
Created attachment 994452 [details]
Provision naming hotfix

Comment 5 Greg McCullough 2015-02-23 17:00:39 UTC
Created attachment 994453 [details]
Provision name seeding script

Comment 8 Milan Falešník 2015-04-17 13:36:10 UTC
Hi Josh,

could you be more specific with the details how to reproduce this issue?


Comment 14 Milan Falešník 2015-05-19 15:06:36 UTC
The VMs are enumerated automatically on

Comment 15 Marianne Feifer 2015-05-28 14:32:40 UTC
Fixed in previous errata.  Setting to requires_doc_text-

Comment 17 errata-xmlrpc 2015-06-16 12:51:10 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.


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