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 - [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
Classification: Red Hat
Component: Tasks Plugin
Version: 6.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
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: 2021-12-10 16:27 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
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24114 0 None None None 2018-06-29 16:41:26 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:37:34 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 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


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