Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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: VERIFIED
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: 6.5.0
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: 2018-12-11 21:35 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:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
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.


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