Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1623277

Summary: katello-host-tools triggers package profile update at install-time, potentially causing issues at scale.
Product: Red Hat Satellite Reporter: Dylan Gross <dgross>
Component: katello-agentAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Jan Hutaƙ <jhutar>
Severity: medium Docs Contact:
Priority: high    
Version: 6.4CC: dgross, jhutar, jsherril, wpinheir
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:37:48 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:
Bug Depends On:    
Bug Blocks: 1619394    

Description Dylan Gross 2018-08-28 21:29:55 UTC
Description of problem:

   The katello-host-tools has a script in the RPM that triggers a "katello-package-upload" and a "katello-enabled-repos-upload" when the RPM is installed (or uninstalled).

   # rpm -q katello-host-tools --scripts
    posttrans scriptlet (using /bin/sh):
    katello-package-upload 2> /dev/null
    katello-enabled-repos-upload 2> /dev/null
    exit 0


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

   Current

How reproducible:

Steps to Reproduce:
1.  Install katello-host-tools rpm on a large number of Content Hosts

Actual results:

   All Content Hosts will begin uploading package profiles immediately.

Expected results:

   Do not upload package and repo information from plugin until done so by yum or rhsmd.

Additional info:

   I would suspect the RPM install script is there to generate an initial state, as future rhsmd uploads and yum plugin uploads only act when they detect a change.   However, if an initial flag can be set to indicate that it's never uploaded, that could potentially be used as a determination whether the initial state has ever been uploaded to the Satellite/portal.

  The downside in large environments is that an install/upgrade of all the clients can potentially render the Satellite unavailable as it doesn't benefit from any of the random variation introduced by subscription-manager's splay, or the normal stagger of yum activity in the environment.  Instead, it is immediate and overwhelming.

Comment 5 Justin Sherrill 2018-09-07 01:36:15 UTC
Dylan, 

If we only did it on initial installation, would that improve the situation sufficiently?  

Justin

Comment 16 Satellite Program 2018-10-17 04:02:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25181 has been resolved.

Comment 17 Justin Sherrill 2018-10-22 17:53:57 UTC
A fix for this is now available in the upstream foreman client repos: http://koji.katello.org/releases/yum/foreman-client-nightly/

It would be great if these could be tested.  This new version (3.3.6) will now honor the configuration in the yum plugin config files /etc/yum/plugins.d/ (even on sles systems).  

In addition two environment variables (DISABLE_KATELLO_PACKAGE_PROFILE and DISABLE_KATELLO_ENABLED_REPOS) can be used to disable one command or zypper action.  

For the executable commands (katello-package-upload and katello-enabled-repos-upload), the --force flag will bypass the yum config and any environment variables and force the upload.

Comment 23 errata-xmlrpc 2019-05-14 12:37:48 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-2019:1222