Bug 2106700 - Invocations fail with NoMethodError - undefined method `code' if capsule loses script feature without satellite noticing
Summary: Invocations fail with NoMethodError - undefined method `code' if capsule lose...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.12.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.12.0
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
: 2111701 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-13 10:44 UTC by Peter Ondrejka
Modified: 2023-05-19 09:34 UTC (History)
3 users (show)

Fixed In Version: rubygem-foreman-tasks-6.0.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-16 13:34:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 35328 0 Normal Closed Proxy batch triggering does not properly propagate errors when remote parent task fails to be triggered 2022-08-22 10:25:04 UTC
Red Hat Issue Tracker SAT-11967 0 None None None 2022-08-22 10:30:00 UTC
Red Hat Product Errata RHSA-2022:8506 0 None None None 2022-11-16 13:34:44 UTC

Description Peter Ondrejka 2022-07-13 10:44:18 UTC
Description of problem: 
With ssh debug mode enabled, all job invocations fail to complete

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

How reproducible:
always

Steps to Reproduce:
1. set "ssh_log_level: debug" in /etc/foreman-proxy/settings.d/remote_execution_ssh.yml
2. restart foreman-proxy
3. execute a remote job

Actual results:
Job fails with

Initialization error: RestClient::NotFound - 404 Not FoundError loading data from Capsule: NoMethodError - undefined method `code' for "404 Not Found":String
Did you mean?  encode

Expected results:
successful execution

Additional info:
Without ssh debug everything works as expected

Comment 1 Adam Ruzicka 2022-07-13 10:53:01 UTC
Can we have full logs from the proxy?

Comment 2 Peter Ondrejka 2022-07-13 11:08:48 UTC
Yes, but there wasn't much there, seems like the debug mode didn't get enabled... I can share the machine though

Comment 3 Peter Ondrejka 2022-07-13 12:13:54 UTC
The issue was in ssh debug level being higher than the regular debug:

[W] Error details for Couldn't enable 'script': <RuntimeError>: ssh_log_level cannot be more verbose than regular log level

The error is logged, but the issue does not prevent foreman-proxy restart, so it can go unnoticed until the job is run. 

Keeping the bz open to see if we can somehow communicate the config requirement more intuitively. What comes to mind:
- ssh_log_level misconfig could prevent successful foreman-proxy restart 
- maybe a comment in /etc/foreman-proxy/settings.d/remote_execution_ssh.yml saying #ssh_log_level cannot be more verbose than regular log level ?
- ?

Comment 5 Peter Ondrejka 2022-09-09 11:59:56 UTC
Verified on satellite 6.12 snap 10, the error message is now more informative it the described case: "Failed to initialize: Actions::ProxyAction::ProxyActionStopped - Failed to trigger task on the capsule: 404 Not Found"

Comment 9 errata-xmlrpc 2022-11-16 13:34:34 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 (Important: Satellite 6.12 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:8506

Comment 10 Adam Ruzicka 2023-05-19 09:34:45 UTC
*** Bug 2111701 has been marked as a duplicate of this bug. ***


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