Bug 1196369

Summary: [RFE] Automate - modify miq_request.user_message= to immediately update miq_request.message attribute.
Product: Red Hat CloudForms Management Engine Reporter: Tina Fitzgerald <tfitzger>
Component: AutomateAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED ERRATA QA Contact: Shveta <sshveta>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4.0CC: gmccullo, jhardy, mfeifer, obarenbo, ssainkar, sshveta, xlecauch
Target Milestone: GAKeywords: FutureFeature
Target Release: 5.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
The previous change for the miq_request.user_message method set the "Last Message" only for state machine error conditions and/or the finished state. Long running state machines would not report correct "Last Message" until the end of the state machine. With the current release, changed the user_message= method to set the miq_request.message to report an accurate "Last Message" status during state machine processing.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-16 12:51:32 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tina Fitzgerald 2015-02-25 20:13:00 UTC
Description of problem:
The miq_request.user_message method sets the "Last Message" only for state machine error conditions and/or the finished state. 

Long running state machines would not report correct "Last Message" until the end of the state machine.

Changing the user_message= method to set the miq_request.message will report an  accurate "Last Message" status.   



Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 CFME Bot 2015-04-08 13:31:06 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4907d31d6e3bfeebbaa427754abde15edb9d3384

commit 4907d31d6e3bfeebbaa427754abde15edb9d3384
Author:     Tina Fitzgerald <tfitzger>
AuthorDate: Thu Apr 2 14:45:23 2015 -0400
Commit:     Tina Fitzgerald <tfitzger>
CommitDate: Tue Apr 7 18:49:37 2015 -0400

    Updated miq_request.user_message to set miq_request.message attribute.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1196369

 vmdb/app/models/mixins/miq_request_mixin.rb                 |  1 +
 ...iq_ae_service_service_template_provision_request_spec.rb | 13 +++++++++++--
 .../miq_ae_service_service_template_provision_task_spec.rb  | 11 +++++++++++
 3 files changed, 23 insertions(+), 2 deletions(-)

Comment 3 Tina Fitzgerald 2015-04-28 20:14:44 UTC
PR was merged.
https://github.com/ManageIQ/manageiq/pull/2507

Comment 5 Tina Fitzgerald 2015-05-15 17:26:57 UTC
https://github.com/ManageIQ/manageiq/pull/2507

Validation steps here:
https://bugzilla.redhat.com/show_bug.cgi?id=1161253

The difference is that you should see the "Last Message" for miq_request immediately when setting the user message, rather than when the service is complete.

The previous change for the miq_request.user_message method set the "Last Message" only for state machine error conditions and/or the finished state, long running state machines would not report correct "Last Message" until the end of the state machine.

Changed the user_message= method to set the miq_request.message to report an accurate "Last Message" status during state machine processing.

Comment 6 Shveta 2015-05-18 19:19:09 UTC
Last message set immediately
Verified in 5.4.0.0.26.20150511144816_f924bd4

Comment 8 errata-xmlrpc 2015-06-16 12:51:32 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-2015-1100.html