RedHatInsights / insights-core

Insights Core is a data collection and processing framework used by Red Hat Insights
https://cloud.redhat.com/insights
Apache License 2.0
153 stars 183 forks source link

insights-client does not fetch new insights-core.egg as etag is same #1751

Open chenlizhong opened 5 years ago

chenlizhong commented 5 years ago

After remove /var/lib/insights/last_stable.egg and last_stable.egg.asc, insights-client is using rpm.egg (old version) to make request, it does not download the newest egg file. Comparing the etag, it is same, so return 304. no need to update.

Debug log:

2019-03-18 04:39:31,194 DEBUG insights.client.connection Branch information: {"remote_branch": -1, "remote_leaf": -1} 2019-03-18 04:39:31,197 DEBUG insights.client Beginning core fetch. 2019-03-18 04:39:31,197 DEBUG insights.client.connection NO PROXY: None 2019-03-18 04:39:31,198 DEBUG insights.client Found etag "c237b78d37b74a95bf3ac43932c2b5ef:1552592118" 2019-03-18 04:39:31,198 DEBUG insights.client Making request to https://cert-api.access.redhat.com/r/insights/v1/static/core/insights-core.egg for new core 2019-03-18 04:39:31,198 DEBUG insights.client Requesting new file with etag "c237b78d37b74a95bf3ac43932c2b5ef:1552592118" 2019-03-18 04:39:31,771 DEBUG insights.client Status code: 304 2019-03-18 04:39:31,771 DEBUG insights.client date: Mon, 18 Mar 2019 08:39:31 GMT 2019-03-18 04:39:31,771 DEBUG insights.client last-modified: Thu, 14 Mar 2019 19:34:53 GMT

Expected result:

Download the latest egg file.

gravitypriest commented 5 years ago

Yep this is a known problem. For now the workaround is to delete the etag files: /etc/insights-client/.insights-core.etag /etc/insights-client/.insights-core.gpg-sig.etag

chenlizhong commented 5 years ago

Test in my VM and work well. Removing below two files, execute insights-client, it will dowload the latest egg and put it into /var/lib/insights folder

/etc/insights-client/.insights-core.etag /etc/insights-client/.insights-core-gpg-sig.etag