Project

General

Profile

Actions

Feature #24114

closed

Enable configuration setting to turn on foreman tasks cleanup logging

Added by Ivan Necas about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Difficulty:
Triaged:
No
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1594882

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]


Related issues 1 (0 open1 closed)

Related to foreman-tasks - Feature #22915: Have a Mechanism to Proactively Detect and Clean "orphaned" Dynflow TasksClosedAdam RuzickaActions
Actions

Also available in: Atom PDF