Bug 1552800 - Retirement requester is not passed down correctly to automate
Summary: Retirement requester is not passed down correctly to automate
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.2
Assignee: Lucy Fu
QA Contact: Brandon Squizzato
URL:
Whiteboard:
Depends On: 1547527
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-07 18:47 UTC by Satoe Imaishi
Modified: 2022-07-09 09:30 UTC (History)
10 users (show)

Fixed In Version: 5.9.2.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1547527
Environment:
Last Closed: 2018-05-07 20:44:14 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1328 0 None None None 2018-05-07 20:44:34 UTC

Comment 2 CFME Bot 2018-03-07 19:41:23 UTC
New commit detected on ManageIQ/manageiq/gaprindashvili:

https://github.com/ManageIQ/manageiq/commit/9042c3eab43bdd1724431cb22c71b4c651d54846
commit 9042c3eab43bdd1724431cb22c71b4c651d54846
Author:     Greg McCullough <gmccullo>
AuthorDate: Fri Feb 23 16:25:49 2018 -0500
Commit:     Greg McCullough <gmccullo>
CommitDate: Fri Feb 23 16:25:49 2018 -0500

    Merge pull request #17033 from lfu/retirement_requester_1547527

    Changes to catch the retirement requester in automate.
    (cherry picked from commit 7856a59838008f3d651a81f994c193a792d2c670)

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

 app/models/mixins/retirement_mixin.rb | 13 +-
 spec/models/vm/retirement_management_spec.rb | 15 +-
 2 files changed, 24 insertions(+), 4 deletions(-)

Comment 3 Brandon Squizzato 2018-04-02 15:48:13 UTC
Verified on 5.9.2.0.20180320210136_355c506 by retiring a VM via REST API with a POST to /api/vms/<vm ID> and data {'action': 'retire'}

'userid' attribute was visible and 'retirement_initiator' was "user" for this request, as seen in miq_ae_tools/log:

----] I, [2018-04-02T11:35:36.178898 #11916:d55138]  INFO -- : <AEMethod [/ManageIQ/Infrastructure/VM/Retirement/StateMachines/Methods/start_retirement]> Starting 
[----] I, [2018-04-02T11:35:36.648675 #11916:e39978]  INFO -- : <AEMethod start_retirement> Listing Root Object Attributes:

<...snipped...>

start_retirement> 	retirement_initiator: user
[----] I, [2018-04-02T11:35:36.675674 #11916:1118568]  INFO -- : <AEMethod start_retirement> 	tenant: #<MiqAeMethodService::MiqAeServiceTenant:0x0000000cd32028>
[----] I, [2018-04-02T11:35:36.676537 #11916:1118568]  INFO -- : <AEMethod start_retirement> 	type: ManageIQ::Providers::Microsoft::InfraManager::Vm
[----] I, [2018-04-02T11:35:36.677906 #11916:1118568]  INFO -- : <AEMethod start_retirement> 	user: #<MiqAeMethodService::MiqAeServiceUser:0x0000000cd328c0>
[----] I, [2018-04-02T11:35:36.679051 #11916:1118568]  INFO -- : <AEMethod start_retirement> 	user_id: 1
[----] I, [2018-04-02T11:35:36.679911 #11916:1118568]  INFO -- : <AEMethod start_retirement> 	userid: admin

Comment 6 errata-xmlrpc 2018-05-07 20:44:14 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:1328


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