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:
Disabling "logs" feature in foreman-proxy of Satellite or a Capsule, API request:
/api/statuses
returns 500 error.
The reason is evident from source code:
https://github.com/theforeman/foreman/blob/develop/app/services/ping.rb#L66 :
def statuses_smart_proxies
results = []
SmartProxy.all.includes(:features).map do |proxy|
start = Time.now
begin
version = proxy.statuses[:version].version['version']
features = proxy.statuses[:version].version['modules']
failed_features = proxy.statuses[:logs].logs.failed_modules
..
The proxy without logs feature has proxy.statuses without :logs :-/
The line should be like:
failed_features = (proxy.statuses[:logs].nil? ? {} : proxy.statuses[:logs].logs.failed_modules)
Version-Release number of selected component (if applicable):
Sat6.7
How reproducible:
100%
Steps to Reproduce:
1. Have an external Capsule
2. On the Capsule, disable "logs" feature:
satellite-installer --scenario=capsule --foreman-proxy-logs=false
3. Check statuses API call on Satellite:
curl -L -u admin:mysecret007 http://$(hostname -f)/api/statuses
Actual results:
{
"error": {"message":"Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs."}
}
Expected results:
{"results":{ ... (some usual output)
Additional info:
The foreman-proxy "logs" feature was added in 6.4-ish release. Any newer Satellite deployment (not upgraded from that version) should have the feature enabled by default and work well.
BUT any Satellite upgraded from 6.4ish version will have the feature _disabled_ by default, causing "hammer status" (that calls the API request) to fail - by default..
Verified
On Sat 6.9 snap 15.0
Disabled logging on internal and external capsules. Either way didn't cause any problems, I could access the api and get the status, this time without the "logs" feature listed, as expected.
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.9 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-2021:1313