Bug 1797386

Summary: [RFE] Allow Subscription-manager service plugin for zypper (SLES) to set autorefresh in repo file
Product: Red Hat Satellite Reporter: Dylan Gross <dgross>
Component: Subscription ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Cole Higgins <chiggins>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: bcourt, bkearney, chiggins, egolov, jhnidek, jjeffers, jturel, mmccune, pcreech, satellite6-bugs
Target Milestone: 6.7.4Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: subscription-manager-1.27.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1874171 (view as bug list) Environment:
Last Closed: 2020-09-30 13:38:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dylan Gross 2020-02-03 00:35:40 UTC
1. Proposed title of this feature request

  [RFE] Allow Subscription-manager service plugin for zypper (SLES) to set autorefresh in repo file.

3. What is the nature and description of the request?

   zypper caches metadata on a client.   If the repo file for subscription-manager (in "/etc/zypp/repos.d/" ) contains the line "autorefresh=1", a zypper invocation will refresh the metadata automatically when it is used.   However, by default, using the Red Hat provided tools, that line is absent and thus defaults to "autorefresh=0", requiring that the updating user first issue a refresh command before using zypper.

   This request would like the repo stanzas (as created by the subscription-manager tools) to include whichever "autorefresh=<n>" setting is set in the /etc/rhsm/zypper.conf file when it writes out the repo stanzas to the .repo files.

4. Why does the customer need this? (List the business requirements here)

   End users receive confusing errors when attempting to do updates and the metadata is out of date.  Allowing the autorefresh to happen transparently as a configuration would eliminate much confusion.

5. How would the customer like to achieve this? (List the functional requirements here)

   The admins will set "autorefresh=0" or "autorefresh=1" in the /etc/rhsm/zypper.conf.    When the zypper service plugin for subscription-manager is called to add/modify or any action that causes the .repo file to be re-written, it will include the autorefresh=[0|1] line from the config file in each repos stanza.   Ideally, it would also obey to "-f ,--refresh" command-line options when modifying a repo to allow something different than a single global value.

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

   Set the .conf to autorefresh=1.   Add a repo to the client.   Check that the "autorefresh=1" is present in the repo stanza

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

    No.

8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

   Customer would appreciate a solution as soon as possible.

9. Is the sales team involved in this request and do they have any additional input?

  Sales team aware.  No additional input.

10. List any affected packages or components.

   Red Hat Satellite tools for non Red Hat os.

11. Would the customer be able to assist in testing this functionality if implemented?

   Absolutely.

Comment 23 errata-xmlrpc 2020-09-30 13:38:34 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 (Satellite Tools 6.7.4 Async Bug Fix 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/RHBA-2020:4130

Comment 24 Red Hat Bugzilla 2023-09-14 05:51:02 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days