Project

General

Profile

Actions

Bug #36835

closed

Timeout for "hammer --no-headers erratum list --errata-restrict-applicable 1 --organization-id 1"

Added by Ian Ballou 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Errata Management
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:
Error via hammer when running the command below
---
hammer d --no-headers erratum list --errata-restrict-applicable 1 --organization-id 1
--

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

How reproducible:
100% ~ 7000 errata applicable to 10k hosts

Steps to Reproduce:
1. Create an environment with ~ 7000 errata applicable to 10k hosts (or perhaps reduce the puma worker timeout to be very small)
2. Execute the command
3.

Actual results:
There is an issue as presented below
---
[ERROR 2023-10-13T00:54:08 API] 502 Bad Gateway
[DEBUG 2023-10-13T00:54:08 API] "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>502 Proxy Error</title>\n</head><body>\n<h1>Proxy Error</h1>\n<p>The proxy server received an invalid\r\nresponse from an upstream server.<br />\r\nThe proxy server could not handle the request <em><a href=\"/katello/api/errata\">GET /katello/api/errata</a></em>.<p>\nReason: <strong>Error reading from remote server</strong></p></p>\n</body></html>\n"
[DEBUG 2023-10-13T00:54:08 Exception] Using exception handler HammerCLIKatello::ExceptionHandler#handle_general_exception
[ERROR 2023-10-13T00:54:08 Exception] Error: 502 Bad Gateway
Error: 502 Bad Gateway
[ERROR 2023-10-13T00:54:08 Exception]

RestClient::BadGateway (502 Bad Gateway):
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:223:in `exception_with_response'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/abstract_response.rb:103:in `return!'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.4.0/lib/apipie_bindings/api.rb:353:in `block in rest_client_call_block'
---

and on httpd logs
---
[Fri Oct 13 00:54:08.298157 2023] [proxy_http:error] [pid 127044] (20014)Internal error: [client 10.8.29.218:51648] AH01102: error reading status line from remote server httpd-UDS:0
[Fri Oct 13 00:54:08.298467 2023] [proxy:error] [pid 127044] [client 10.8.29.218:51648] AH00898: Error reading from remote server returned by /katello/api/errata
---

Expected results:
The complete report

Additional info:


The issue seems to be that the applicable errata filtering relies too heavily on the web server rather than postgres. The timeout is resolved if duplicate errata entries are made distinct by postgres. See the PR for more info.

Actions #1

Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/10770 added
Actions #2

Updated by Samir Jha 7 months ago

  • Subject changed from Timeout for "hammer --no-headers erratum list --errata-restrict-applicable 1 --organization-id 1" to Timeout for "hammer --no-headers erratum list --errata-restrict-applicable 1 --organization-id 1"
  • Target version set to Katello 4.11.0
  • Triaged changed from No to Yes
Actions #3

Updated by The Foreman Bot 7 months ago

  • Fixed in Releases Katello 4.11.0 added
Actions #4

Updated by Anonymous 7 months ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF