Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1594882

Summary: [RFE] Enable configuration setting to turn on foreman tasks cleanup logging
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: Tasks PluginAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Jan Hutaƙ <jhutar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.1CC: aruzicka, inecas, jhutar, pcreech
Target Milestone: 6.5.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman-tasks-0.13.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:37:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 Satellite Program 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