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.
Description of problem:
In some cases, long running task like LOCE task and Katello Event Monitor task in a heavy loaded Satellite can get kill forcefully when restarting the foreman-tasks.
After restarting the foreman-tasks, these tasks will get invalidated and enter paused/error state due to Abnormal termanation like below.
---------------------------
6b764da1-7575-4b4b-a4ce-cb7b42bd8ae1,ForemanTasks::Task::DynflowTask,Actions::Candlepin::ListenOnCandlepinEvents,2019-06-23 07:53:31,,paused,error,97a1929c-1d6d-4ab2-a904-3338065334b0,,2019-06-23 07:53:31.69066
07:55:29.880357,118.021665403,87.6361777380003,0.5,1,Dynflow::ExecutionPlan::Steps::RunStep,"{""class"":""Dynflow::ExecutionPlan::Steps::Error"",""exception_class"":""StandardError"",""message"":""Abnormal termination (previous state: running)""
---------------------------
Dynflow wait for 20 seconds and then kill the executors if the tasks still haven't finished by that time.
---------------------------
Jun 24 14:33:09 my-satellite dynflowd: Dynflow Executor: stop in progress
Jun 24 14:33:09 my-satellite dynflowd: dynflow_executor: trying to stop process with pid 30687...
Jun 24 14:33:09 my-satellite dynflowd: dynflow_executor: trying to stop process with pid 30699...
Jun 24 14:33:29 my-satellite dynflowd: dynflow_executor: process with pid 30687 won't stop, we forcefully kill it...
Jun 24 14:33:29 my-satellite dynflowd: dynflow_executor: process with pid 30699 won't stop, we forcefully kill it...
---------------------------
Since that we are setting the systemd TimeoutSec to 90 seconds, Dynflow should also increase the "force_kill_waittime" of ruby daemon to some value below 90 seconds.e.g 60 seconds.
cat /usr/lib/systemd/system/dynflowd.service
[Service]
Type=forking
User=foreman
TimeoutSec=90 <======================= Systemd timeout
WorkingDirectory=/usr/share/foreman
ExecStart=/usr/sbin/dynflowd start
ExecStop=/usr/sbin/dynflowd stop
EnvironmentFile=-/etc/sysconfig/dynflowd
daemons-1.2.3/lib/daemons/application.rb
def initialize(group, add_options = {}, pid = nil)
@group = group
@options = group.options.dup
@options.update(add_options)
@dir_mode = @dir = @script = nil
@force_kill_waittime = @options[:force_kill_waittime] || 20 <========== Default 20 seconds
Suggest to make the "force_kill_waittime" an option in Dynflow so that user can adjust it.
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 (Moderate: Satellite 6.11 Release), 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-2022:5498
Description of problem: In some cases, long running task like LOCE task and Katello Event Monitor task in a heavy loaded Satellite can get kill forcefully when restarting the foreman-tasks. After restarting the foreman-tasks, these tasks will get invalidated and enter paused/error state due to Abnormal termanation like below. --------------------------- 6b764da1-7575-4b4b-a4ce-cb7b42bd8ae1,ForemanTasks::Task::DynflowTask,Actions::Candlepin::ListenOnCandlepinEvents,2019-06-23 07:53:31,,paused,error,97a1929c-1d6d-4ab2-a904-3338065334b0,,2019-06-23 07:53:31.69066 07:55:29.880357,118.021665403,87.6361777380003,0.5,1,Dynflow::ExecutionPlan::Steps::RunStep,"{""class"":""Dynflow::ExecutionPlan::Steps::Error"",""exception_class"":""StandardError"",""message"":""Abnormal termination (previous state: running)"" --------------------------- Dynflow wait for 20 seconds and then kill the executors if the tasks still haven't finished by that time. --------------------------- Jun 24 14:33:09 my-satellite dynflowd: Dynflow Executor: stop in progress Jun 24 14:33:09 my-satellite dynflowd: dynflow_executor: trying to stop process with pid 30687... Jun 24 14:33:09 my-satellite dynflowd: dynflow_executor: trying to stop process with pid 30699... Jun 24 14:33:29 my-satellite dynflowd: dynflow_executor: process with pid 30687 won't stop, we forcefully kill it... Jun 24 14:33:29 my-satellite dynflowd: dynflow_executor: process with pid 30699 won't stop, we forcefully kill it... --------------------------- Since that we are setting the systemd TimeoutSec to 90 seconds, Dynflow should also increase the "force_kill_waittime" of ruby daemon to some value below 90 seconds.e.g 60 seconds. cat /usr/lib/systemd/system/dynflowd.service [Service] Type=forking User=foreman TimeoutSec=90 <======================= Systemd timeout WorkingDirectory=/usr/share/foreman ExecStart=/usr/sbin/dynflowd start ExecStop=/usr/sbin/dynflowd stop EnvironmentFile=-/etc/sysconfig/dynflowd daemons-1.2.3/lib/daemons/application.rb def initialize(group, add_options = {}, pid = nil) @group = group @options = group.options.dup @options.update(add_options) @dir_mode = @dir = @script = nil @force_kill_waittime = @options[:force_kill_waittime] || 20 <========== Default 20 seconds Suggest to make the "force_kill_waittime" an option in Dynflow so that user can adjust it.