Bug 1570951

Summary: Service and VM retirement are non-deterministic, running parallel
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: AutomateAssignee: drew uhlmann <duhlmann>
Status: CLOSED ERRATA QA Contact: Landon LaSmith <llasmith>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, duhlmann, gekis, igortiunov, mkanoor, obarenbo, smallamp, tfitzger
Target Milestone: GAKeywords: ZStream
Target Release: 5.8.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.8.4.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1563627 Environment:
all CFME (bug should be cloned)
Last Closed: 2018-06-25 14:20:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Unknown Target Upstream Version:
Embargoed:
Bug Depends On: 1563627    
Bug Blocks:    

Comment 2 CFME Bot 2018-04-23 20:21:56 UTC
New commit detected on ManageIQ/manageiq/fine:

https://github.com/ManageIQ/manageiq/commit/611b2a414d562f2ea9ef9ed4a88a3d0652683bb8
commit 611b2a414d562f2ea9ef9ed4a88a3d0652683bb8
Author:     Greg McCullough <gmccullo>
AuthorDate: Thu Apr 19 08:47:41 2018 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Thu Apr 19 08:47:41 2018 -0400

    Merge pull request #17280 from d-m-u/adding_lock_to_retire_now

    Add lock to retire_now start
    (cherry picked from commit 2deffa58399461396e3bbd57b93fc744f0c64e88)

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

 app/models/mixins/retirement_mixin.rb | 43 +-
 spec/models/service/retirement_management_spec.rb | 23 +-
 spec/models/vm/retirement_management_spec.rb | 19 +
 3 files changed, 67 insertions(+), 18 deletions(-)

Comment 3 Landon LaSmith 2018-05-29 22:00:17 UTC
VERIFIED in 5.8.4.3. I had 2 appliances in the same region connected to the same primary database. I was able to retire a VM and the retirement was started on a single machine and finished on another machine. There were no duplicate retirement events reported in the logs.  

I recommend that the customer test this fix prior to closing the BZ due to the use of custom automate code in their environment

Comment 5 errata-xmlrpc 2018-06-25 14:20:41 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.

https://access.redhat.com/errata/RHSA-2018:1972