During VM provisioning if the VM name is defined to use enumeration as part of the naming the get_vm_full_name method is called in /app/models/miq_provision/naming.rb. This method can be called from multiple processes (across multiple appliance) at the same time and in a race condition would result in the same enumeration value being returned. I have some thoughts around an enhancement to this feature to push more of the logic into automate and the automate model, but we still need to protect against this race condition with the existing logic.
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/d2689d3c182475861973885bfaf5f74b7d484205 commit d2689d3c182475861973885bfaf5f74b7d484205 Author: Bill Wei <bilwei> AuthorDate: Thu Jan 15 11:59:49 2015 -0500 Commit: Bill Wei <bilwei> CommitDate: Thu Jan 29 10:29:15 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. https://bugzilla.redhat.com/show_bug.cgi?id=1173336 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
New commit detected on cfme/5.3.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=5442dc86ed9692c16b8719bbeefdb3fbd4900902 commit 5442dc86ed9692c16b8719bbeefdb3fbd4900902 Author: Bill Wei <bilwei> AuthorDate: Thu Jan 15 11:59:49 2015 -0500 Commit: Bill Wei <bilwei> 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. https://bugzilla.redhat.com/show_bug.cgi?id=1173336 https://bugzilla.redhat.com/show_bug.cgi?id=1194319 Conflicts: vmdb/app/models/miq_provision/naming.rb 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
Ok, verified then on 5.4.0.1, it appears to be working.
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://rhn.redhat.com/errata/RHBA-2015-1100.html