Bug 1594882 - [RFE] Enable configuration setting to turn on foreman tasks cleanup logging
Summary: [RFE] Enable configuration setting to turn on foreman tasks cleanup logging
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Tasks Plugin
Version: 6.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Released
Assignee: Ivan Necas
QA Contact: Jan Hutař
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-25 15:40 UTC by sthirugn@redhat.com
Modified: 2019-10-07 17:18 UTC (History)
4 users (show)

Fixed In Version: tfm-rubygem-foreman-tasks-0.13.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:37:27 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:37:34 UTC
Foreman Issue Tracker 24114 None None None 2018-06-29 16:41:26 UTC

Description sthirugn@redhat.com 2018-06-25 15:40:32 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
For debugging foreman-tasks cleanup, we asked one customer to enable the logging in the code as follows:

apply this patch against `/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.*` directory, to increase cleanup logging information: 

diff --git a/lib/foreman_tasks/cleaner.rb b/lib/foreman_tasks/cleaner.rb
index 956dbe2..85e6480 100644
--- a/lib/foreman_tasks/cleaner.rb
+++ b/lib/foreman_tasks/cleaner.rb
@@ -79,7 +79,7 @@ module ForemanTasks
             :states => ['stopped'],
             :backup_dir=ForemanTasks.dynflow.world.persistence.current_backup_dir }
       options = default_options.merge(options)
-
+ Foreman::Logging.logger('foreman-tasks').info("Running foreman-tasks cleaner with options #{options.inspect}")
    @filter = options[:filter]
    @after = parse_time_interval(options[:after])
    @states = options[:states]

Expected results:
Need this option as a configuration setting in Satellite so the ruby code need not be modified.

Additional info:

Comment 2 Ivan Necas 2018-06-29 16:41:24 UTC
Created redmine issue https://projects.theforeman.org/issues/24114 from this bug

Comment 3 Ivan Necas 2018-06-29 16:49:15 UTC
I don't think a configuration option is actually needed: we should just log the info message about the options, for easier debugging. A patch is sent upstream.

Comment 4 sthirugn@redhat.com 2018-06-29 19:56:51 UTC
(In reply to Ivan Necas from comment #3)
> I don't think a configuration option is actually needed: we should just log
> the info message about the options, for easier debugging. A patch is sent
> upstream.

Sounds good to me!

Comment 5 pm-sat@redhat.com 2018-07-02 08:11:02 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/24114 has been resolved.

Comment 12 errata-xmlrpc 2019-05-14 12:37:27 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:1222


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