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 1594948 - Enabled repo report saves cache even if remote server error occurs, resulting in invalid errata
Summary: Enabled repo report saves cache even if remote server error occurs, resulting...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Errata Management
Version: 6.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.4.0
Assignee: Andrew Kofink
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-25 19:50 UTC by Justin Sherrill
Modified: 2019-11-05 23:25 UTC (History)
3 users (show)

Fixed In Version: katello-host-tools-3.3.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:29:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24270 0 None None None 2018-07-17 11:54:13 UTC

Description Justin Sherrill 2018-06-25 19:50:58 UTC
Description of problem:

The enabled-repos-report, which is run on every yum transaction, will save the report in a cache file so to not re-submit the same information multiple times.  It appears that this cache gets saved regardless of whether the report upload was successful or not.  

If an error occurs, the cache would be saved, and it would never re-attempt to upload the report unless something actually changed.


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

How reproducible:
intermittent (with some difficulty). 

Steps to Reproduce:
1.  Enable/disable a repo on a client with sub-man repos
2.  Cause the enabled-repos-report to fail somehow
 

Actual results:
Note that the cache file is updated: /var/cache/katello-agent/enabled_repos.json

Expected results:
Cache is not updated, report is resubmitted with next yum command.

Additional info:

Comment 1 Justin Sherrill 2018-06-25 19:53:11 UTC
A workaround is to run  katello-enabled-repos-upload --force on each client

Comment 4 Andrew Kofink 2018-07-17 11:54:12 UTC
Created redmine issue https://projects.theforeman.org/issues/24270 from this bug

Comment 5 Brad Buckingham 2018-07-20 11:22:21 UTC
Moving to POST as the upstream PR is merged and redmine closed.

Comment 6 Lukáš Hellebrandt 2018-09-27 08:20:21 UTC
Verified with Sat 6.4 snap 22.

1) Have a System registered to Satellite
2) On the System, disable or enable some repo
3) # yum repolist
4) # ll /var/cache/katello-agent/enabled_repos.json
   => Time changed to current time
5) Disable or enable some repo again
6) On the Satellite, set firewall so that connection from the System fails
7) # yum repolist
8) # ll /var/cache/katello-agent/enabled_repos.json
   => Time stayed the same
9) Enable connections to Satellite, run 'yum repolist', check that the time has been set to current

Comment 7 Bryan Kearney 2018-10-16 19:29:25 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, 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-2018:2927


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