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.
Bug 2141348 - It appears that the egg is downloaded every time
Summary: It appears that the egg is downloaded every time
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Insights
Version: 6.9.9
Hardware: All
OS: Unspecified
high
high
Target Milestone: 6.9.10
Assignee: Shimon Shtein
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-09 14:28 UTC by Odilon Sousa
Modified: 2022-11-17 17:17 UTC (History)
3 users (show)

Fixed In Version: rubygem-foreman_rh_cloud-3.0.33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2141308
Environment:
Last Closed: 2022-11-17 17:17:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker ESSNTL-3632 0 None None None 2022-11-09 14:28:30 UTC
Red Hat Product Errata RHSA-2022:8532 0 None None None 2022-11-17 17:17:30 UTC

Description Odilon Sousa 2022-11-09 14:28:17 UTC
+++ This bug was initially created as a clone of Bug #2141308 +++

Description of problem:

I am seeing around 100k downloads per hour. This leads me to believe that the client is downloading this information to do any sort of "should I refresh" logic instead of using some server side check. 


Expected results:

Ideally, if these files are not changed then the files are not downloaded.

Additional info:

Comment 1 Jameer Pathan 2022-11-10 15:17:10 UTC
Verified:

Verified with:
- Satellite 6.9.10 snap 2
- tfm-rubygem-foreman_rh_cloud-3.0.33-1.el7sat.noarch

Test steps:
- Register Satellite content host with insights.
- Run "insights-client" on the content host.
- Check /var/log/foreman/production.log on Satellite for insights-core.egg download requests.

Observations:
- Satellite 6.9 is now sending etag to https://cert-api.access.redhat.com/r/insights/v1/static/release/insights-core.egg
- response `304 NotModified` is returned from the server(meaning that client has the latest insights egg, so no need to re-download it).

Additional info:

---
On client:
# cat /etc/insights-client/.insights-core.etag
"e454bc2ccc068771c9fc3e7668adbeb2:1667486431.027061"

# insights-client --version
Client: 3.1.7
Core: 3.0.302-1

# insights-client --net-debug
** trimmed output **
GET https://satellite.example.com:443/redhat_access/r/insights/v1/static/release/insights-core.egg
GET https://satellite.example.com:443/redhat_access/r/insights/v1/static/release/insights-core.egg
HTTP Status: 304 Not Modified
** trimmed output **

---
Satellite production.log:
** trimmed output **
2022-11-10T08:30:48 [I|app|60b8af11] Started GET "/redhat_access/r/insights/v1/static/release/insights-core.egg" for <ip-address> at 2022-11-10 08:30:48 -0500
2022-11-10T08:30:49 [I|app|60b8af11] Processing by InsightsCloud::Api::MachineTelemetriesController#forward_request as
2022-11-10T08:30:49 [I|app|60b8af11]   Parameters: {"path"=>"v1/static/release/insights-core"}
2022-11-10T08:30:49 [D|tax|60b8af11] Current location set to none
2022-11-10T08:30:49 [D|tax|60b8af11] Current organization set to none
2022-11-10T08:30:49 [D|app|60b8af11] Request parameters for telemetry request: {"branch_id"=>"99e683c4-79fc-4be6-8384-e0ff48a7eb7e"}
2022-11-10T08:30:49 [D|app|60b8af11] User agent for telemetry is: Foreman/2.3.1.25;foreman_rh_cloud/3.0.33;insights-client/3.1.7 (Core 3.0.302; requests 2.20.0) Red Hat Enterprise Linux 8.6 (CPython 3.6.8; Linux 4.18.0-372.32.1.el8_6.x86_64); systemd
2022-11-10T08:30:49 [D|app|60b8af11] Sending headers: {:if_none_match=>"\"e454bc2ccc068771c9fc3e7668adbeb2:1667486431.027061\""}
2022-11-10T08:30:49 [D|app|60b8af11] Sending request to: https://cert-api.access.redhat.com/r/insights/v1/static/release/insights-core.egg
2022-11-10T08:30:49 [D|app|60b8af11] RestClient.get "https://cert-api.access.redhat.com/r/insights/v1/static/release/insights-core.egg?branch_id=99e683c4-79fc-4be6-8384-e0ff48a7eb7e", "Accept"=>"*/*", "Accept-Encoding"=>"gzip, deflate", "Content-Type"=>"#<Mime::NullType:0x000000001f2ffc50>", "If-None-Match"=>"\"e454bc2ccc068771c9fc3e7668adbeb2:1667486431.027061\"", "User-Agent"=>"Foreman/2.3.1.25;foreman_rh_cloud/3.0.33;insights-client/3.1.7 (Core 3.0.302; requests 2.20.0) Red Hat Enterprise Linux 8.6 (CPython 3.6.8; Linux 4.18.0-372.32.1.el8_6.x86_64); systemd"
 60b8af11 |
2022-11-10T08:30:49 [D|app|60b8af11] # => 304 NotModified | application/zip 0 bytes
 60b8af11 |
2022-11-10T08:30:49 [I|app|60b8af11] Completed 304 Not Modified in 117ms (Views: 0.5ms | ActiveRecord: 1.7ms | Allocations: 5110)
** trimmed output **

Comment 7 errata-xmlrpc 2022-11-17 17:17:17 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.9.10 Async Security Update), 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:8532


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