Bug 1534967 - reboot ReX fails with "Runner error: NameError - uninitialized constant ForemanRemoteExecutionCore::ScriptRunner::MAX_PROCESS_RETRIES" [NEEDINFO]
Summary: reboot ReX fails with "Runner error: NameError - uninitialized constant Forem...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: katello-tracer
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
high with 1 vote vote
Target Milestone: 6.5.0
Assignee: Ivan Necas
QA Contact: Stephen Wadeley
Depends On:
TreeView+ depends on / blocked
Reported: 2018-01-16 11:53 UTC by Jan Hutař
Modified: 2022-03-13 14:38 UTC (History)
29 users (show)

Fixed In Version: tfm-rubygem-katello-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-14 12:36:57 UTC
Target Upstream Version:
bbuckingham: needinfo? (inecas)

Attachments (Terms of Use)
logs from Satellite (31.23 KB, text/plain)
2018-01-16 11:53 UTC, Jan Hutař
no flags Details

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 26185 0 High Closed Tracer rex templates don't handle reboot properly 2021-02-16 17:49:24 UTC
Red Hat Bugzilla 1531127 0 high CLOSED Remote execution job with reboot/init commands always failed 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 3494981 0 None None None 2018-09-14 22:22:41 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:37:04 UTC

Internal Links: 1531127

Description Jan Hutař 2018-01-16 11:53:45 UTC
Created attachment 1381950 [details]
logs from Satellite

Description of problem:
Reboot ReX (content host details -> Traces -> check kernel -> Restart Selected) fails with "Runner error: NameError - uninitialized constant ForemanRemoteExecutionCore::ScriptRunner::MAX_PROCESS_RETRIES"

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have system registered with remote execution SSH key deployed and with updated kernel
2. Go to Content host details -> Traces -> check "kernel" -> Restart Selected

Actual results:
System is restarted, but ReX job fails with "Runner error: NameError - uninitialized constant ForemanRemoteExecutionCore::ScriptRunner::MAX_PROCESS_RETRIES"

Trace record for a "kernel" which needs to be restarted remains there.

Expected results:
Job should pass if restart worked (it worked for me) and trace item should go away.

Additional info:
Might not be related, but the client system I'm using have locale set to cs_CZ.UTF-8 in /etc/locale.conf.

Comment 4 Matthew LeSieur 2018-03-28 13:35:58 UTC
I also ran into this problem.  The Host reboots, which clears all of the traces, but the job status is "failed".  I believe this happens because the job template "Restart Services - Katello SSH Default" runs a script that first executes a "reboot" then executes "katello-tracer-upload".  The problem seems obvious, the script never finishes because the Host reboots.  The "katello-tracer-upload" should probably be run on or shortly after boot.

This looks like a template issue.  The "Restart Services - Katello SSH Default" dynamically selects what action to take based on what services need to be restarted.  If a service just requires a restart, then something like...

systemctl restart service

...would be performed.  In the case of the Kernel, the template resolves to "reboot".


  The actual template is:

<%= input(:helper).split(",").map {|split| "#{split}" }.join("\n") %>


Satellite version:
$ rpm -q satellite


Comment 5 rajasekar 2018-04-09 18:53:38 UTC
Would like to know is there any update on this bug..

Comment 6 Gary Luciano 2018-04-13 18:25:49 UTC
The issue remains in 6.3.1

This seems to ONLY effect RHEL 7 systems.

Runner error: NameError - uninitialized constant ForemanRemoteExecutionCore::ScriptRunner::MAX_PROCESS_RETRIES
Exit status: EXCEPTION

^ that is from a RHEL 7.4 system.

Comment 17 rajasekar 2018-08-27 22:09:25 UTC
The issue remains in 6.3.3

Please let us know the FIX

Comment 22 Ivan Necas 2019-02-28 09:42:32 UTC
Created redmine issue https://projects.theforeman.org/issues/26185 from this bug

Comment 23 Bryan Kearney 2019-02-28 13:05:38 UTC
Upstream bug assigned to inecas@redhat.com

Comment 24 Bryan Kearney 2019-02-28 13:05:40 UTC
Upstream bug assigned to inecas@redhat.com

Comment 25 Bryan Kearney 2019-03-05 15:05:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/26185 has been resolved.

Comment 31 errata-xmlrpc 2019-05-14 12:36:57 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.


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