Bug 1308692

Summary: During retirement the user that started the retirement should be stored as userid not user_id
Product: Red Hat CloudForms Management Engine Reporter: Chris Pelland <cpelland>
Component: AutomateAssignee: mkanoor
Status: CLOSED ERRATA QA Contact: Taras Lehinevych <tlehinev>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.4.0CC: cpelland, dajohnso, jhardy, jprause, mfeifer, mkanoor, nachandr, obarenbo, tfitzger
Target Milestone: GAKeywords: ZStream
Target Release: 5.4.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: automate
Fixed In Version: 5.4.5.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1306835 Environment:
Last Closed: 2016-03-29 14:18:13 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:
Embargoed:
Bug Depends On: 1306835    
Bug Blocks: 1308691    

Comment 1 CFME Bot 2016-02-16 17:20:17 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b01191ec5f1887999f070b323057ac117c5069be

commit b01191ec5f1887999f070b323057ac117c5069be
Merge: 6d59dd9 c14044f
Author:     Greg McCullough <gmccullo>
AuthorDate: Tue Feb 16 11:51:13 2016 -0500
Commit:     Greg McCullough <gmccullo>
CommitDate: Tue Feb 16 11:51:13 2016 -0500

    Merge branch 'bugzilla_1308692_5_4_z' into '5.4.z'
    
    user_id should be userid when storing the user that started the retirement
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1308692
    
    During retirement the userid of the inititator should be stored
    as userid and not as user_id.
    
    Not a clean cherry-pick
    (1) spec/models/orchestration_stack/retirement_management_spec.rb didn't exist in 5.4
    (2) simple provider names instead of the complex provider names e.g. "VmVmware" instead of "ManageIQ::Providers::Vmware::InfraManager::Vm"
    
    Original PR:
    https://github.com/ManageIQ/manageiq/pull/6633
    
    See merge request !795

 vmdb/app/models/mixins/retirement_mixin.rb             | 2 +-
 vmdb/spec/models/service/retirement_management_spec.rb | 2 +-
 vmdb/spec/models/vm/retirement_management_spec.rb      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comment 3 Taras Lehinevych 2016-03-21 10:03:49 UTC
Verified on 5.4.5.2

Copy update_retirement_method to test domain and modify code as following:

st = $evm.root['userid']
st_error = $evm.root['user_id']

$evm.log("info", "USERID:<#{st}>")
$evm.log("info", "USERID_error:<#{st_error}>")

Output:
[----] I, [2016-03-21T06:03:10.405216 #2936:4d3dd2c]  INFO -- : <AEMethod update_retirement_status> USERID:<admin>
[----] I, [2016-03-21T06:03:10.406367 #2936:4d3dd2c]  INFO -- : <AEMethod update_retirement_status> USERID_error:<>

Comment 5 errata-xmlrpc 2016-03-29 14:18:13 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://rhn.redhat.com/errata/RHBA-2016-0171.html