Bug 1717883

Summary: [RFE] Add logs about tasks state changes
Product: Red Hat Satellite Reporter: Ivan Necas <inecas>
Component: Tasks PluginAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: aruzicka, egolov, inecas, vsedmik
Target Milestone: 6.6.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman-tasks-0.15.2-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 12:47:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivan Necas 2019-06-06 11:52:20 UTC
The logs should contain information about the state change of a task, including task_id, execution plan id, new state and result (for paused and stopped tasks), for example:

<pre>
2019-04-16T14:22:10 [I|bac|] Task {label: Actions::Try::Pause, id: 759dfb3d-f14a-4112-b336-e6f65e3e5eb9, execution_plan_id: 75d6e6fc-bc18-4e60-8d34-5a5a7d5dccb0} state changed: planning 
2019-04-16T14:22:10 [I|bac|] Task {label: Actions::Try::Pause, id: 759dfb3d-f14a-4112-b336-e6f65e3e5eb9, execution_plan_id: 75d6e6fc-bc18-4e60-8d34-5a5a7d5dccb0} state changed: planned 
2019-04-16T14:22:10 [I|bac|] Task {label: Actions::Try::Pause, id: 759dfb3d-f14a-4112-b336-e6f65e3e5eb9, execution_plan_id: 75d6e6fc-bc18-4e60-8d34-5a5a7d5dccb0} state changed: running 
2019-04-16T14:22:10 [I|bac|] Task {label: Actions::Try::Pause, id: 759dfb3d-f14a-4112-b336-e6f65e3e5eb9, execution_plan_id: 75d6e6fc-bc18-4e60-8d34-5a5a7d5dccb0} state changed: paused  result: error
</pre>

Comment 1 Ivan Necas 2019-06-06 11:52:22 UTC
Created from redmine issue https://projects.theforeman.org/issues/26626

Comment 2 Ivan Necas 2019-06-06 11:52:27 UTC
Upstream bug assigned to inecas

Comment 6 Peter Ondrejka 2019-07-04 13:06:19 UTC
Verified on Sat 6.6 snap 8, task state changes are now part of production log

Comment 8 errata-xmlrpc 2019-10-22 12:47:39 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-2019:3172