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.
Descriptionsthirugn@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:
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 4sthirugn@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 5Satellite Program
2018-07-02 08:11:02 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
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: